Professors cheat also. I've seen several of them invite someone with a reputation to a meeting or just talk with them, then offer to add that person to a paper they are working on "because they contributed to the meeting or conversation". It's a way of buying influence for their paper and getting in good with the person with the reputation. It's very similar to ghost-writing or freeloading, the distinguished person usually does no actual work on the paper (they are asked if they want to add their name when the paper is finished and ready to be submitted) yet everybody involved benefits from reputation enhancement for no effort. Students see this happening and learn from it.
People say "that's real life" - well, no. In the workforce there's some accountability and the freeloader will get fired while you get promoted.