Where the AC mains romex goes through the hole in the 2x4 across the top of the studs and on up into the attic, there is some type of hardened reddish gunk placed around the cabling to plug the hole in the 2x4 and hold the cable rigidly in place.
My guess is that the purpose of the 'gunk' is to hold the cable, prevent critter intrusions, and provide insulation between hollow of interior wall and attic.
What is that compound?
Also, is there a similar, but more pliant, sealant? Just in case the cabling needs to be replaced and the pliant sealant will allow everything to be pulled out?