So Facebook says that the foundation of the web is sending data to the server (such as cookies) and receiving information back.
Nowhere in the protocol does it say they can't track you. Ergo, tracking is perfectly legal and moral.
The foundation of the internet is that the server sends you data. Your browser happens to have a security hole and you got a virus.
Totally ethical and legal. Nowhere in the HTTP protocol does it say not to send viruses.