Every node stores a lot more information that just its addresses' total balances. For example, global information about issued assets and permissions. But also, each node tracks the full set of unspent transaction outputs, for any address. It just doesn't index that information by address, but rather by txid, since this is all that's required to verify new transactions. That's why you can't query the balance for any address.