I'm assuming you're specifically talking about bitcoin. The details differ for other systems.
To validate a transaction, there are several things you need to check. But it's vital that you check that the transaction outputs that it attempts to consume exist and haven't already been spent. The outputs exist if they were created by a transaction in a prior block. The outputs haven't already been spent if they weren't consumed by any transaction in a prior block nor in any prior transaction in the block the transaction is in.
You'll notice that both of these rules require you to know what transactions are in prior blocks to this block and what outputs are consumed by prior transactions in this block. So these rules can't be enforced properly other than in the context of a particular position in a particular block.
To avoid abusive relaying, servers do validate transactions independently to see if they seem likely to be able to get into a block. This reduces the ability of a possible attacker to trick the network into wasting a lot of bandwidth relaying transactions that are very unlikely to get into a block. But this is just a guess to save relaying resources.