Transistor Schmitt trigger vs opAmp Schmitt trigger
Possibly cost, when opamps were expensive. Transistors are cheap enough, but the costs of extra passive components and more complex assembly and testing quickly add up.

Possibly speed : you can find transistors faster than opamps (then you need careful design to achieve that potential high speed).

Definitely voltage tolerance : you can find transistors rated at several hundred volts more easily than high voltage opamps.

If none of these special cases apply, opamps will be much easier to design with, and give a more accurate and predictable design.