The technical costs of every instance trying to index all other posts on all other instances would be huge. Only megacorporations would be able to afford to run an instance.
However, there are ways for smaller servers to mitigate this using relays, especially relays based on tags:
https://fedi.tips/using-relays-to-quickly-expand-a-servers-view-of-the-fediverse/