Think of it like this: your PSN account info is stored on a Sony server. This info includes your ID, password, address, credit card info (if you've chosen to have it saved), trophies, friends list, etc. and it also has a list of PS3s in which your account is activated (serial # of the machines, most likely).
So when you log-on with a PSN account on a PS3 and go to account management and choose to deactivate, that machine's serial number is removed from the list, and when you activate, that machine is added. If you already have 5 machines activated on your account, then PSN will refuse to activate any more machines. That's the reason why deleting an account from a PS3 won't deactivate it, since as far as PSN is concerned that machine is still activated on your account.
The XMB is setup so that purchased games can only be played if the account that bought them is both present on the machine AND active, and you can only activate and deactivate a machine for a particular account from that specific PS3. How else could you do that?