Why are they there? It’s not bad luck; it’s a sign that organic buildup (hair, soap scum, grease) has accumulated inside your pipes. That is where they lay their eggs.
How to detect them: They look like tiny moths and are slow fliers. If you want to find out which drain they are coming from, place a piece of adhesive tape over the drain at night; the ones stuck to it in the morning will give you your answer.
The real solution: Don’t waste money on insecticides; they are useless if you don’t clean the source. You need to scrub the inside of the pipes and remove that layer of organic “slime.”
Prevention: Keep the bathroom well-ventilated, use hot water for cleaning, and don’t let hair accumulate in the drain grate.