I agree with your sentiment, but traffic lights pre-date cars - the first ones were around the Houses of Parliament (UK) in 1868 and there were manually controlled ones in the U.S.A. at the beginning of the 20th century before there were large numbers of cars.
However, modern traffic lights tend to be designed exclusively for motorised traffic and here in the UK it's annoying because we don't have a "turn left on red" rule, so cyclists can end up waiting at a red light even though a left turn would be perfectly safe. I got caught out the other day at a set of lights that didn't detect me on my carbon bike, so I sat patiently waiting (the other roads were busy) until I figured out that my turn had been missed and had to carefully find a gap to make my turn.
The other thing is that stopping and starting on a bike takes significant energy and effort, so a straight road with many lights can turn an easy commute into a chore which is why it's common to see cyclists going through red lights. Interestingly, that kind of red-light jumping is allowed under some jurisdictions e.g. Paris.