Dark Spots on Wood in Attic
Pitch. Dried tree sap. That appears to be a rather large &quot;pitch pocket&quot;, and other than the size, is perfectly normal.
The other possibility (hard to be sure from this picture) is that it's more of a &quot;bark inclusion&quot; where a dent/scar that had scabbed over on the face of the tree was not removed in planing.
A higher grade of carpenter would probably have tossed that board in the scrap bin, but presumably it met grade for the class of wood required and your house builder was more into budget than &quot;nice.&quot; #2 studs can be pretty awful looking and still work.