Each school treats them differently.
Some schools have to protect their reputation handing out easy A’s.
Other schools have to have rigorous standards. Failing even smart people confirms that.
At the end of the day, the actual grade doesn’t matter, it’s what you do with the knowledge.
Always do your best, but make sure learning is the goal. Grades are secondary.