The Beatles were huge in 1964. Heck, they're still huge now. In 1964 everyone wanted a piece of them and United Artists realized it had a potential goldmine. Brian Epstein had signed a deal granting United Artists the right to make a film starring the Fab Four. A deal that granted them the right to release the movie soundtrack.
The studio didn't care about the film; it just wanted to make money off the soundtrack. With this in mind, they approved a budget of $500,000 and free reign of the project to young director Richard Lester and the boys. They just wanted a releasable film that would allow them to cash in on a soundtrack.
To everyone's surprise, United Artists received a hit album AND a classic film that has inspired every rock band film that came afterwards. The movie and the album were huge hits.