In college in the US it was done for business purposes. All grades were posted publicly but anonymously. You looked up your grade by your student number or SSN.
I've never known an institution to post for either of the reasons you are stating. Personally I wouldn't think either would be appropriate and it would probably open some places up for lawsuits. People can get their knickers in a bunch for privacy reasons. To some a grade could be as personal as sensitive medical information.