Generally the endogenous clock is approximate (hence the word circadian, about a day). But that’s because the day length has been constantly lengthening since animals evolved. Too slowly for us to notice, but the proteins that handle clocking are fairly ancient (though there are additional copies in humans compared to a fruit fly, say), and they aren’t locked in to favor a rotation period for Earth because there hasn’t been a stable period over long stretches.
The clock entrains to the environment, though. The more the daylight brightness to night time darkness shift in intensity, the higher amplitude their rhythms are, generally. Other signals also entrain them, like social activity, and the gut clock is a whole other complexity (kinda downstream of the brain clock but it can feed right back and wreck the central oscillation).
Any number of these factors can cause circadian effects, from a flatter rhythm, changed period, entrainment mismatch, etc.
In rare cases when a circadian gene itself is mutated, then you can have the clock period stretched significantly, and then synchronizing to the 24 hour day becomes really hard.