The primary way politicians get reelected is by demonstrating to their constituents they've done things.
And because politics is comprised overwhelmingly by unimpressive and unimaginative sociopaths interested in enslaving their fellow man, the path to reelection and doing things is by passing laws, even if the laws make no sense.