Why do female frogs (or female fish) lay hundreds of eggs?

The female frogs (or female fish) lay hundreds of eggs because there are fewer chances of surviving in that environment, so from 100 even if 5-10 survive, their species will survive. 

40