In America:
Section 230 of the Communications Act provides immunity for online platforms and users, stating they generally aren't liable for content posted by others, allowing them to host third-party information without being treated as the "publisher or speaker".
I'm guessing Europe has a similar provision.