This is standard practice at a lot of universities. At my university results were scaled based on the class performance in that exam and the performance of everyone in other exams. So if you're all 4.0 students, but the exam is horrendous and everyone only gets 20%, you'll probably end up with a good grade still.
I studied physics. It was possible to game the system to a certain extent. If you took the (subjectively) hardest modules like gauge theory, you could get a high grade even if you only answered half the paper. So if you were smart, but not top of your class, you'd be better off taking the hard subjects because every mark you got was effectively worth more. If you took the easy and popular modules, every mark would count and it might even be normalised down.