At a previous employer I worked at, this was pretty common.
If you left your computer unlocked for any amount of time, you were pretty much guaranteed to be screwed with.
Because it was so common, it wasn't a big deal. If you got an odd email from a co-worker, you assumed they must have forgotten to lock their computer.
It was a security related company, and the general excuse was that the practice was intended as negative reinforcement to push everyone to have better security practices.
I don't know if it was a good or bad culture to have. I can tell you that, to this day, I never leave my computer unlocked.
Pranks are a sign of trust. The trust bit is that you only use it for pranks and not any of the myriad other things you can actually do with a logged in computer. But the pranks should be a reminder they might just as well not have been a prank, and that you should bloody well lock your computer already.
Can't find it at the moment but I remember Adam Savage once saying that him and Jamie Hyneman never play practical jokes on each other. It would end up with one of them duct-taping the windows on the other one's house to fill it with water. Don't prank your sysadmin. It won't end well for you.
For context, the two Mythbusters presenters have famously different personalities and are not exactly friends. This reinforces the idea that pranks are generally done between people who feel they can trust one another.
There was trust between them. Trust does not require compatible personalities. Both of them have spoken at length about their working relationship. Part of that trust was knowing the other one would never condone or sign off on pranking. Adam was pranked once with a cattleprod and it resulted in firing the producer that was responsible (and Jamie was not in on it).
Pranks are cheap laughs, slapstick humor. It does not belong in a work environment.
I've done this, but I would only do it to people I already consider friends. If it ends up being over-stepping, you apologize and move on. It shouldn't be a big deal.
It was a security related company, and the general excuse was that the practice was intended as negative reinforcement to push everyone to have better security practices. I don't know if it was a good or bad culture to have. I can tell you that, to this day, I never leave my computer unlocked.