Outsiders, and a lot of new engineers, think an estimate is your honest best guess at duration. You picture the work, you say three weeks, the number is a prediction. Then they watch the same engineers be wrong every single time and conclude engineers are just bad at this.
We are bad at it, but that's not what's happening. The estimate is the first move in a negotiation about how much uncertainty the organization is willing to tolerate on paper. You don't say three weeks because you believe three weeks. You say it because you know "I genuinely don't know, the auth system this touches has no tests and the last person who understood it left" is not an acceptable sentence in a planning meeting. The org needs a number to put in a plan, the plan needs to look committable, and your range gets crushed down to a point estimate by the social requirement that someone sound confident.
I've watched the exact same task get estimated at one week or four depending entirely on who was in the room and how badly the date was already promised to a customer. The engineering reality didn't change between Tuesday and Thursday. The negotiating position did. When a deadline is pre-committed, estimates mysteriously contract to fit it, and everyone treats the resulting fiction as a forecasting failure six weeks later when it slips.
The tell is what happens to your uncertainty. An honest forecast preserves the range. A negotiation strips it, because a range is a weak hand. "Two to eight weeks" gets read as "doesn't know," so you learn to say four and eat the variance privately. That eaten variance, the thing you knew and weren't allowed to keep on the record, is the part that later gets called "engineers always sandbag" or "engineers always overrun," depending on which way it broke.
If you want better estimates, make it socially safe to keep the range. Otherwise you're not measuring how long work takes. You're measuring the fiction the room demanded.