How is this legal?
See also Ferrari's rules about what you and cannot do with their cars.
Apple won't sue you for “misusing” your iPhone, they have no grounds to.
Also, any of those restrictions are hardware/software enforced. You can do whatever the hell you want with it if you happen to find how to circumvent those limitations.
You are the owner, they just have a lien. Before that qualifies as ownership, possession takes hold.
Houses are different; you legally own your house while paying the mortgage.