It depends on how far from the intersection you are. If you can’t stop before the intersection, you shouldn’t slow down because you need to get through the intersection in time.
Those cars didn’t have time to stop safely. They would have had to slam on the breaks, which is very dangerous because the car behind you might not stop in time. Speeding up to get through in time is the right decision if you are very close to the intersection when the light turns yellow.
There is no intersection design that could avoid this. Some people are going to be too close to the intersection to stop in time when they see yellow no matter what you do.
That doesn't excuse speeding up, though – if the yellow light is long enough, you will always be able to either a) safely stop with a certain given maximum deceleration, or else b) continue at your current speed and enter the intersection before the light turns red.
Those cars didn’t have time to stop safely. They would have had to slam on the breaks, which is very dangerous because the car behind you might not stop in time. Speeding up to get through in time is the right decision if you are very close to the intersection when the light turns yellow.