Speeding in the pitlane results in a fine pre-race or usually a drive through mid-race. Your ‘taking out another driver’ could range from a slight brushing of endplate against rear wheel to full on t-boning somebody out of the race and the penalties can be varied from nothing at all through grid penalties to a full on race ban or multiple race ban.
The reason many drivers are given drive through penalties (which is what I assume you are referring to) is so that the offending driver receives some sort of race disadvantage/penalty without the need for black flagging them.
What would you prefer, an instant black flag for every incident??