When programming it's easy to think about the happy path. The path along which you get well-formed valid data, all your requests return successfully and everything works on your target platform. When you're in this mindset it's easy to just check it works in one case and assume everything is alright. But the majority of real work in programming is the unhappy paths.
While you always need to be thinking about how things could go wrong, it's much more important in web programming. I've written a lot of batch data processing, and while you have to be careful of things like malformed data and encoding issues, you control the environment so many classes of failure are managable. Web programming is much more uncontrolled; your client side code could be operating on a vast number of different browsers and may not work properly on some of them, any request you make can fail due to connection issues, and the data your server recieves could be maliciously crafted. It may work in one case, but then be unusuable for certain users, fail intermittently and even leave your server open to compromise by an injection attack.