Generally you can use the Shape Tracing feature (built-in, just enable it from under Modules) to explore where different pieces of the layout come from.
The header zone's markup specifically comes from a shape method (as the markup of shapes can be defined not just in templates, but also in shape methods) in Orchard.Core.Shapes.CoreShapes.Zone()
.