What can Apple even sue for? How can they legally keep people from installing things they don't want them to?
There are many ways:
1) End User License Agreements (EULAs) which most of their customers accept without reading them first.
2) DRM
3) Anti-circumvention laws. For example the DMCA in the United States. There are many such laws around the world based on the WIPO treaties. Most people do not realize that Copyright Law of all things has become a very significant tool for censorship and oppression in the 21st century.