Ticket for overdue inspection

Meh, I had a 10 day temp inspection when I registered one of my cars. Got pulled over, the cop STILL wrote me a ticket for it.
I showed the DA that I had a temp inspection sticker on the day I got the ticket, and that my car is now registered, I still got a $30 fine.
His response was “maybe you’ll get your car inspected the first day you buy it next time”

fucking prick