Mining is also used as a consensus algorithm, if there's a fork on the network every node will choose the longest chain as the winning one. This makes it expensive to vote on a fork (by pointing your mining power towards it). If there were only nodes as a consensus algorithm, it would be "cheap" to create many votes and thus easy for a bad guy to abuse.
Thank you.
But why would we need blocks if there wasn't double-spending problem? Nodes would only contain the transactions. No blocks, no forks.
No, blocks are needed for lots of things. It's the way bitcoin is made.
In the first place a node can have a different transaction from the rest of the network and won't have any way of knowing which transaction is conflicted for real if they don't download blocks.