Steven's answer is correct. A complementary way of looking at it is optimization.
Let's start by assuming that one understands why consensus by majority doesn't work (too easy for an attacker to create bad nodes and take over). Bitcoin's proposed solution is to use a log that keeps track of all transactions and to maintain consensus by log length, not node count. For this to work, Bitcoin proposes a few conditions:
- We assume that anyone can create a log (i.e., we don't trust anyone to maintain a "known good log").
- The log with the most entries is always considered authoritative.
- Each entry has some kind of intrinsic link to the entry that comes before it and the one that comes after it.
- It's really difficult (i.e., it takes a lot of time) to add a log entry.
The last condition is really important. If it's easy to add log entries--for example, if the log is just a text file sitting on your desktop--then any attacker can create really long, fake but authoritative transaction logs with whatever sort of transactions that the attacker wants.
If it takes a lot of time to add each entry, however, then an attacker will need to spend all the time that has already been spent on creating the main log just to catch up and create a fake log that is as long. By the time they catch up, the main log will have already moved on and gotten even longer. It becomes increasingly unlikely that an attacker will ever be able to catch up by creating a fake log that is longer than the main log as the main log gets longer and more popular. That diminishing probability is what makes Bitcoin secure.
So what does this have to do with optimization?
Now, the question is, what exactly goes into the transaction log? This is where optimization comes in.
If each log entry were literally a record of a single transaction and if each log entry took, say, 10 minutes to create, it would take forever to make transactions. So instead, Bitcoin proposes that the log tracks mini-logs of transactions. Each transaction is trivial to create and easy to verify, but each mini-log is difficult to create and tracks all the transactions that occurred during a period of time. The idea is that with each new mini-log, faking transactions continues to become increasingly difficult, but at the same time transactions can occur instantly.
How does this work? When you conduct a new transaction, that transaction is broadcast to all nodes who keep track of it in local copies of the current mini-log. Each node is also working on a difficult calculation (hashing) that takes a relatively long time (for Bitcoin's network as of writing, about 10 minutes on average). All it takes is for one node in the network successfully complete the problem, and then that node's local mini-log copy is considered complete and is sent to every other node. Once every node accepts the winning mini-log copy, that copy is considered the authoritative mini-log for all the transactions that had previously been considered conditional. All the transactions that occurred instantly are now said to have one "confirmation."
Now...replace the word "log" with "chain" and "mini-log" with "block" and now you understand why blockchains are necessary not just from a security standpoint but from an optimization standpoint, as well ;-)