The answer to 'why is my carpenter ant scratching sounds' is that carpenter ants are making these noises as they tunnel and build their nests inside your home's wood. Carpenter ants don't actually eat the wood, but they hollow it out to create their nests, which can cause structural damage over time.
The scratching or rustling sounds you hear are the worker ants moving around inside the wood as they expand their nest. This is a common sign of a carpenter ant infestation, especially if you hear the noises coming from your walls, floors, or other wooden structures. Other signs include seeing the ants themselves, sawdust-like wood shavings, and damage to the wood.