This is because the long jaws and teeth of spinosaurids are more suited to catching prey like fish and would be only marginally effective in killing a larger dinosaur.
The snouts of spinosaurids which have been preserved with them seem to be developed to house pressure sensitive receptors that would have allowed them to sense fish swimming in water.