This is similar in Germany. Although I always had the it was necessary to remove a certain percentage from students with weed-out courses as entry to Maths, CS and Engineering is mostly free.
But as soon as you are through the weed-out stage (or undergrad) A or B is pretty much the only grade you can get.
Luckily (if I should put it like that), the grades themselves are usually fair. It's just that some subjects require too much work to be considered as one subject, which seems to be the university's intentions.