I'll bet his teachers were very gracious about being told that from a Liverpool working-class 7-year-old.
I don't believe that he actually said that anyway.
It's not a very good approach to life. In my grandparents' time, which is the generation that endured the Great Depression and WW2, there was the emphasis on what you had to do in life - getting a job, etc., etc. If you could be happy too, great - but it wasn't the focus. This focus on personal happiness as the ultimate goal in life is what's produced today's spoiled, self-centered bratty kids.
Our parents generation was never interested in keeping up standards. They wanted to be happy, but the last way to be happy is to make it your objective in life.
Those are very fair points.
How do you become Happy? The search for happiness will usually lead you to search outside yourself, where you won't find it.
On the other hand, the idea that "all that matters is that you're happy" may help to defuse a lot of false goals in life.
For example, somebody living a life on small means but doing something they really care about may be happy, but their parents may see it as terrible situation not to have Status and Security, and pressure them to become a doctor or lawyer. (Bruce Springsteen tells that his parents were still pressuring him to go to college well after he was a multi-millionaire.)