In many other games that have private servers: If there was no codebase leak, basically guessing what you can't know. That's why many private servers doesn't work 1:1 when compared to the official servers, people just tried to make the calculations as close as possible after reversing it.
MapleStory was also kind of an interesting case because the developers were careless enough to include debug symbols with their binaries on multiple occasions.
The client is typically just sending simple events (e.g., player moved left) to the server. The server collects events from all the connected clients to build a shared state, and pushes state updates to clients.
Edit: jpcrs makes a good point about this and their comment is worth reading.
Note that having the server do the calculation can solve some of the cheating problem, I remember a modified quake server that would not send location information if you could not see the player, which made wallhacks not work. I just got totally nerd sniped by the memory and while I can't find the demonstration video that impressed me so much at the time. I did find that it was darkplaces quake that added the option "sv_cullentities_trace" which prevents wallhacks.
www.icculus.org/twilight/darkplaces/readme.html#ServerFeatures