This saying also exists in the German-speaking part of Europe, "Zuerst die Arbeit, dann das Vergnügen.". The meaning is exactly the same.
And yes, often children and teenagers think "boah, school, so bad!" and want to be adults, because "they can do whatever they want". Well, yes, but actually...