One being documentation. We want to avoid spreading magic numbers in the codebase.
Another is as a starting point for something that may become a complicated calculation. The answer for one specific situation may be the hardcoded number in the first iteration over the problem. The next time we we iterate over the problem, we may find that the static number isn’t sufficient and add some calculation. When adding the calculation we use the safety net from the first test to verify that we didn’t break anything. Hardcoding in this situation is the first step towards a general solution. If we need a general solution. I would expect the time between the first and second iteration to be measured on the second scale or the minute scale if we can determine early that a hardcoded value isn’t enough.
The point here is small and safe steps. It is easier to solve a small problem then solving a large problem. Large problems can always be divided into many smaller problems. A hardcoded number is a smaller problem then getting a complicated calculation right.