In many fields dealing with legal or regulatory requirements are a daily thing. Sarbanes Oxley compliance is critical for large businesses, health care organizations have to consider HIPAA, programming for state, local or federal government projects tends to have lots of regulatory requirements. You may also need to consider Government Accounting Standards to make sure you have what auditors need. You may have to deal with privacy considerations and there are laws about how the disabled must have ways to access the data.
In our business we have government regulations that vary by state that our clients must follow and spend a fair amount of time making sure the compliance rules are followed and in creating reports to show that we have complied with regulations. If you are selling anything, at a minimum you need to consider taxes. You may also get stuck dealing with things like ISO certification requirements which aren't legal, but are simliar in their pain in the posterior factor.
In general if you are doing business programming (especially anything to do with health care or finances) and you are unaware of any legal or regulatory requirements, you have a good chance of doing something wrong. If you (or your company) have never asked about them, then you are definitely doing something wrong as it should be one of the first questions that almost every project starts with. You don't know if the answer is no unless you ask.
If you are selling software to businesses (not so much individuals), regulatory compliance is often a key selling point as not everyone does a good job with this. We get a lot of our clients specifically because we do a much better job of this than our competition and regulatory compliance is critical for our clients.
If you are in Gaming, I would expect less of a need for this although, I'd bet there are still disability laws to comply with.
I personally have never worked on a major project that didn't have some regulatory or legal needs to consider.