More often than not, they don’t. As is the case with most laws they “write” and try to pass. Even very, very serious pieces of legislation (the Affordable Care Act and the Authorization for Use of Force Against Iraq Resolution, for example) ges voted on by people who have barely even read the first page. There’s a reason Congress has an abysmal approval rating.
And it isn’t just Congress, either. States often do the same thing, like California requiring that all semi-automatic firearms sold in the state to microstamp ammunition when it isn’t technically possible (let alone feasible).
Latest Answers