Philosophy is mandatory as part of the IB curriculum. The course I'm thinking of is typically named "Theory of Knowledge", and while formally an epistemology course, it can be taught quite broadly.
I can't speak to anyone else's experience, but I found being exposed to Philosophy while still in high school to be quite meaningful, and went on to dual-major in it while in college.
As another IB student I can concur that I found the Theory of Knowledge class very rewarding. And the things I learnt in that class have probably given more than the stuff I learnt in math or physics class, despite going off to study physics at university and then switching to math.
That being said I also remember being one of the few students who felt the course interesting and worthwhile. Most of the other students saw it as a waste of time and focused mainly on how to get a good enough grade to not affect their overall average while doing the least amount of work possible.
I can't speak to anyone else's experience, but I found being exposed to Philosophy while still in high school to be quite meaningful, and went on to dual-major in it while in college.