Police officers are not allowed to engage in police activity, notably activity involving armed suspects, with a prisoner on board. An officer doing so would be severely disciplined.
When the gun thug is on the bus threatening the passengers, his head is against the window. Instead of walking around the bus and shooting him through the glass, Lopez waits to take the shot.