They don't retrieve any data unless someone requests it. It became accessible accessible via ipfs.io just because you, or someone else, requested it.
Here's an experiment you can do to verify this behavior. Add a unique file to your local IPFS node and pin the hash. Leave that node running for a few minutes, hours or days. Stop your local node and try to retrieve the file via ipfs.io. You won't be able to.
It depends on the configuration of the gateway node.