This is at the crux of these kinds of things. As a software developer myself, I can also say this stuff usually isn’t “the programmers”, most often these kinds of rules come from the client. They often want certain information from a customer, or indeed want to prevent customers from abusing their system, or even just want to force data to fit into the models of other systems.
Simplest example of how this gets weird is names. What is a name? It is just a set of characters, right? So, as a programmer, you make a single field that just checks if there is something filled in. But then the client wants to put that data in a system that sends out mailings that start with something like “Dear mr. so-and-so” or “Dear mrs. lastname”. So they say “we need to know what their firstname is and what their lastname is and how to address them”. Ok, you add a field “lastname” and a field “title”. The client looks at that and says “our CRM system can only deal with Mr. Mrs. and Ms.”. You growl a little and change your “title” field to a dropdown with just these options. After a while the client comes back to you “someone entered as a name ‘Ms. Twilight Sparkle’ and we’re pretty sure it’s a dude. Apparently he’s using his stagename. Please check if entered names are real and the entered title matches their gender”. At this point programmers will most likely start to complain and (rightly) call bullshit, but more often than not the sales dept. will want to keep this client and tell the programmer to just build it anyway.