The nodes don't all separately query the source. Instead, someone queries the source and sends a transaction to the network, with the data and the source's signature. The transaction gets incorporated into a block, updates the state, and now everybody has the same data.
How do the nodes running the code all get the same response from an external data source?
Even if they use a service such as oraclize if the contract calls https://api/query?param1 and it returns lets say the weather:
Node1 gets: 15.2c Node2 gets: 15.3c
We've already failed on consensus haven't we?