The answer to 'what attracts carpenter ant' is that carpenter ants are attracted to sources of moisture and decaying wood. They build their nests in damp, rotting wood like that found in roof eaves, window frames, tree stumps, and old firewood. Carpenter ants are also drawn to sugary foods and pet food left out. Once they find a suitable nesting site, they can quickly establish a colony and cause significant structural damage to a home.
To prevent and control carpenter ants, it's important to eliminate any sources of moisture and repair any wood damage around the home. Seal cracks and crevices, fix leaks, and remove dead trees or stumps. You can also use baits or sprays to kill the ants, but for a major infestation, it's best to call in a professional pest control expert.