Dusk balls are actually part of a line of environmental/circumstantial capture devices that also include dive and net balls. While dusk balls were released to the public much later than the other three, they work essentially the same way. For example, have you ever wondered why dive balls work better underwater or in the vicinity of a large body of water? It’s because the ball is built in with sensors that gather information on the wetness of a certain area. Even when surfing, you’re bound to get a bit wet, and the dive ball understands this and increases the strength of its capture net. In the same way, dusk balls have sensors calibrated to detect light. The less light detected when you expand the ball, the stronger the ball’s capture net will be. In both cases, there is always a baseline; dusk and dive balls work just as well as basic poké balls when not in their respective environments. It’s just that their capture systems are designed in such a way that when certain conditions are met, their internal batteries give them a power boost when used on a pokémon.
As for why, specifically, these balls are designed to do such a thing, it’s because this specific line of poké balls was designed to capture very specific pokémon. Whereas dive and net balls were designed to capture ocean- and river-dwelling pokémon (and bug-types, in the case of the net ball), the dusk ball was originally meant to capture cave-dwelling and nocturnal pokémon.