In Freenet you contribute to a global pool of storage, and end up storing and transmitting whatever the network happens to need. Freenet is intentionally obscure about it. The archive is encrypted, there are no logs, there's no way to list what your node contains, and storage is probabilistic making it hard to determine if something is there because you asked for it, or it passed through your node.
Tor also tries something similar, and has premade explanations to give to authorities if they ask about your exit node.
But those are specifically built to try to work with that case. Stuff happens behind your back that you have zero involvement in besides providing a piece of infrastructure for the network.
In IPFS on the other hand you make a personal, intentional choice to mirror or upload something.
Tor nodes themselves also don't host any data.