As much as you may try to remove loose food from your house, there's one place where you probably keep food in an open, unprotected container all the time: your pet's food bowl. Most pet owners leave food out so that their dogs, cats, rabbits, guinea pigs, etc., can enjoy a nutritious meal whenever they get the munchies. This is fine for you and for your pet, but it's absolute heaven for the lucky ant who stumbles into this treasure trove of edibles. Pretty soon they'll let their friends know about it and the ant feast will begin. Once the bowl is infested, your pet may simply refuse to eat from it -- or, worse, may also become infested with ants.
If this has become a problem at your house, there are specially designed food bowls with built-in "moats" -- essentially an inner bowl and an outer bowl separated by rings of water -- that will frustrate the ants. Your pet can lean over the moat to reach the food but ants drown if they try to cross the gap. Or you can make an ant-free cat bowl yourself by taking a pie tin, filling it with a shallow layer of water, then placing the cat bowl inside it, thus manufacturing your own moat. There are also ant barriers for sale covered with a sticky substance that the ants can't cross.
Unfortunately, pets can be messy eaters, and they may leave a lot of food outside the protective bowl, so be sure to clean it up as soon as possible.