Simply put, it’s mainly about food.
Usually, ants feed on honeydew secreted by aphids. They leave their home, the anthill or nest, to pay a regular visit to the aphid colony. However, there are seasons with relatively few aphids, which in turn means that sweet, sweet honeydew is scarce. During these dire days, the ants are forced to look for alternative food sources. So-called ‘scout ants’ are sent out on a food-seeking mission, which might land them in your house.