Suppose a high school student, or college freshman, has to take a foreign language, some advanced mathematics, etc... There are some justifications for this.
a] Utilitarian. The student will need to speak another language to get a job / travel, etc... Will need math for further science study.
b] The "mental exercise" theory. It's a way of becoming smarter, even if you forget all your French later. Indeed, you assume that most of the content of education is forgotten, but that it is still better to have had it because you will have stronger mental muscles.
c] Credentialism. Showing you can do this, that you're smart enough to master Latin or Calculus, assures people of your intelligence or competence. You learned a particular set of cognitive skills in a very structured environment and so you have a piece of paper that says that.
d] The "well-rounded" theory. You need to have been exposed to a little bit of everything to be a well-rounded educated person.
All of these justifications seem weaker than a more general sense that it is intrinsically good to study these things. I don't know anyone who complains about knowing another language.