Speaker drivers, which includes the drivers in headphones, are mechanical... and they have flexible suspension parts.
Cone speakers usually have the roll shaped edge seal, which you can see, and a flat disc shaped suspension device attached further back, near the voice coil, called a spider.
Dome tweeters, and many headphone drivers, have a single edge roll that acts as both seal and suspension.
And, in planar tweeters and headphones, the membrane itself flexes near the edges to allow it to move forward and backward.
This mechanism acts both as a seal for air and as part of the return spring that brings the diaphragm back to its center rest position after it stops moving.
The resonant frequency of any moving mass, like that diaphragm, is determined by the moving mass, and by the strength of that spring force.
(For a given mass, the less powerful the spring, the lower the resonant frequency.)
In a speaker or headphone, the edge spring typically starts out a bit stiff, but softens a bit after being flexed back and forth for the first few hours.
Then, once it's broken in, it remains pretty much the same over the life of the product.
When you design a speaker or headphone, the design parameters you use for the driver are the ones it will have for most of its life (those are the ones on the spec sheet).
So, for the first few hours, until the suspension softens up (breaks in), the suspension spring is a little too powerful, and so the driver parameters are a bit off.
(Since the parameters are wrong for the first few hours, and correct after that, we assume that the sound after the speaker breaks in will be "right" or "what the designer intended".)
The softening process can take anywhere from an hour or two to a day or two - and affects some drivers much more than others.
(Although you can speed it up by playing test tones for a few hours it will happen by itself with normal use anyway.)
This effect can be significant with some drivers and barely noticeable with others.
It tends to be especially noticeable with ported speakers, where the cabinet tuning is specifically matched to the speaker's resonance, and a mismatch can cause noticeable shifts in bass response.
However, other drivers can also exhibit a slight, and possibly noticeable, difference in sound over the first few hours.
Just once I’d like hear someone say: “I burnt in my headphones for 48 hours and now they sound utterly rubbish”.
If there us an actual change in sound, why is it always an improvement?