Some pianos are solidly built with strongly glued joints, whereas others, like this cheap and cheerful Chinese offering are held together with angle-iron mending plates and tubular steel bars under the keys. These are fine so long as the screws fastening them to the woodwork remain tight.
Unfortunately they often don’t – especially if the piano is moved about – and the whole keyboard can move out of regulation. Quite a bit of work! Often screws that have worked loose in this way don’t simply tighten up again – if you can even get to them easily.