Cookies were initally shared between sites easily.
Now Firefox cluster cookies set by a site for this site only.
An illustration is better than 100 words: https://cdnx.nextinpact.com/data-next/image/bd/171170.png
Cookie privacy has limitation though
In other words, it can do nothing about the tracking carried out directly by the site visited. On the other hand, access to third-party cookies is not totally blocked. It is simply very restricted, as there are certain cases where this access is legitimately used, such as for authentication via a third-party service.
After all if a website is malicious, then is it hard to fight against if a connection has been made :/