Now that routers are affordable, why should I build a network using Layer 2 switches, which degenerate to broadcasting under poor conditions, and not just use real routing at Layer 3?
Edit: Got some great replies. Let me clarify the question: Of course, at the lowest level, you want to plug your end nodes into a switch, not a router (as demonstrated by AlReece). I'm referring to switches which are used to bridge traffic between segments - that is, switches connected to other switches.
I'm assuming that you're talking about reducing the broadcast domain between all of the nodes. So every broadcast domain in the entire network is 2 nodes.
IPv4:
IPv6:
Both:
UPDATE
The broadcast storms honestly depends on your architecture and services. If you have enough control over a network (rack), the broadcasts can be isolated. Otherwise, isolate based on use case (Servers, Workstations, File Sharing, whatever needs it). I wouldn't try to fit one model into everything if it doesn't fit.
Even after isolating the problem and having your network set up. Configure the switches so that they send a SNMP trap when they detect a broadcast storm (when they can). A lot of switches can be configure to prevent the impact of a broadcast storm (it should minify the effects until an administrator can deal with it). Dealing with it is important, it could mean that a user is trying to attack your network from the inside, a network configuration problem, human error, rouge devices, compromised equipment, etc (usually not good)
Typically, switching is faster than routing (there's no hierarchy, so there's at least a chance for fewer lookups). However, switching is not (typically) hierarchical, so you need (potentially) larger state tables ("MAC forwarding tables") in each device.
The assumption that routing tables are smaller relies on having a decent hierarchy of IP addresses, if you need to have a routing table that contains a /32 for each of your end nodes, you have not won anything (the routing table isn't any smaller than the MAC fdb, it's not nearly as trivial to auto-generate, as it relies on a routing protocol instead of packet inspection, if you ever run out of routing-table-space, there is no graceful degradation (or, as you put it "degenerate to broadcating"), it'd just Stop Working).
So, all in all, if I were to build a network, I'd use routed links between larger, switched, networks, trying to get the best of both worlds.
Four things I can think of:
Layer 2 is simpler than layer 3, so presumably network devices can handle it more quickly with less overhead than layer 3.
There have been many years of work on switching so it's extremely robust and well-understood.
Some protocols only work at layer 2, for example spanning tree to prevent broadcast storms.
Switching devices are cheaper than routing devices, so your costs are lower.