The difference is that phones are small and you only need to stock a dozen models to serve most clients.
Only a dozen? Let's see... within the iPhone 5S range in the US, we have 3 different storage capacities (16, 32, 64 Gb) in 3 different colour schemes, with 4 different network setups (Sprint, AT&T, Verizon, T-Mobile/unlocked). That's 27. 40 more for the iPhone 5c (5 colours, 2 sizes, 4 networks). The iPhone 4S is still for sale, but "only" 8 options there because it's 8 Gb only now - except the 3 larger ones are still under warranty, so make that another 32. Then we get the 4 and 3GS - but I'll stop there, because we're already at 99 different handsets for the iPhone alone, before we get into Android handsets! Call them $333 each on average, that's $33k of handsets you're mandated to store but not sell. That's insane - just to avoid a 24 hour wait to Fedex a replacement handset to you!? (Not to mention I'd rather have the replacement shipped to me next-day anyway rather than spend hours travelling just to collect it myself.)
Also, I seem to recall some of the Apple fan sites actually monitor stock levels in Apple's own stores - it usually takes a while for stores to have stock on hand after a launch (while customers buy up stock as soon as it arrives), then once a model is old they start running down stocks to avoid being left holding old kit. So, even Apple themselves don't actually carry stock on the scale the poster seems to be demanding, let alone 3rd party repair shops/vendors!
A few years ago, my MacBook Pro's Superdrive failed. Standard part they'd been using for years ... the Store would have a spare in stock surely? No, I had to wait a week for them to get one shipped from Panasonic ... then I was told I'd have to leave the MBP with them for up to another a week to fit it. Of course, by the time I add up the travel costs alone for 3 visits, I'd have spent the price of a brand new external drive, even before factoring in the c 10 hours of my time spent going to and from the Apple Store, so I told them to install the replacement drive somewhere it wouldn't fit easily and bought an external drive.
So, this legislation would be a hugely expensive "solution" to a trivial problem - and, of course, there's no guarantee that on the day your pink 32 Gb iPhone Verizon 5c happens to need replacing, someone else won't already have claimed that one replacement unit, so you can't have it anyway. Would the legislation somehow guarantee a quick replacement of the replacement by Apple, too? Or it would have to mandate everywhere having two of every handset, in case the first one's already taken ...