Sterile insects are typically produced by radiation. A sufficient dose is used to cause substantial DNA damage in the gametes of the males. However, this doesn't mean the sperm are completely non-functional.
In fact, it is important that the sperm are functional and simply contain dominant-lethal mutations at a sufficient probability (Robinson, 2005 describes this in detail as well as the dosing strategies to optimize the desired outcome).
The males still mate and fertilize the eggs of the female; it is only later that the eggs will eventually fail to develop, but there is no way for the females to be aware of this (nor much that can be done even if they were - once the eggs are fertilized they cannot be fertilized again).
It is also important to release a sufficient population of sterile males to impact the population. Depending on the species, it may or may not be necessary to completely overwhelm the existing population, but a typical goal seems to be 10-100x the native population. By raising males in laboratory conditions, it may be possible to produce a larger population than would typically survive to mating age in the wild.
Cockburn, A. F., Howells, A. J., & Whitten, M. J. (1984). Recombinant DNA technology and genetic control of pest insects. Biotechnology and genetic engineering reviews, 2(1), 68-99.
Klassen, W., & Curtis, C. F. (2005). History of the sterile insect technique. In Sterile insect technique (pp. 3-36). Springer Netherlands.
Robinson, A. S. (2005). Genetic basis of the sterile insect technique. In Sterile Insect Technique (pp. 95-114). Springer, Dordrecht.