In this case, it's not quite BS from AT&T. They wanted to use the spectrum they had been using for 3G to make their LTE network better and certain old LTE devices couldn't do voice-over-LTE (the 3G network would handle voice communication). One could argue that they could have kept the 3G network alive longer (Verizon and T-Mobile shut 3G down in 2022), but at some point old devices stop being able to talk on modern networks. At some point, there's a balance between keeping old networks alive and being able to reuse that spectrum for more efficient networks that serve the vast majority of your customers.
Many countries still have working 3G networks that the iPhone 5S can connect to and they can still be used as WiFi devices in the US (oh, and I'm sure there are some regional carriers in the US that still support 3G).