> Why should the database be the input sanitizer, though?
More in the realm of traditional business IT than what HN is focused on, the database is often the point of integration between several different systems, with views and triggers providing the means of abstraction at the interface boundry.
Of course ideally all such systems would only ever profer perfectly valid data, but in practice ...