Question: "Why did God restrict the age that a priest could serve (Numbers 8:24–26)?"
Answer: Numbers 8:24–26 commands, “This applies to the Levites: Men twenty-five years old or more shall come to take part in the work at the tent of meeting, but at the age of fifty, they must retire from their regular service and work no longer. They may assist their brothers in performing their duties at the tent of meeting, but they themselves must not do the work. This, then, is how you are to assign the responsibilities of the Levites.” God regulated the priestly office and limited the age of priests to 25 to 50 years. Anyone younger or older was not eligible to serve.
The Bible gives no specific purpose of this age limit. However, since Hebrew men were eligible for military involvement at the age of 20 (Numbers 1:1–3), it should be expected that the age of eligibility for priests would be at least that old. In fact, King David later reduced the age for entering priestly service from 25 to 20 in 1 Chronicles 23:27.
At the other end of the spectrum, ending service at 50 years was probably intended to limit priestly service to those with the physical strength to serve. In addition to needing stamina for an all-day job, Jewish priests would often need the strength to help move large livestock (sheep, goats, cattle) as part of their involvement in the tabernacle. Factoring in the shorter lifespan of men of that time, the age of 50 was probably a reasonable limit for full-time service in a job that required significant physical labor.
Verse 26 does not completely forbid the service of men 50 and over. Rather, God said that “they may assist,” as long as they were not doing the work themselves. Those over 50 could serve as assistants or in advisory roles.
The rules limiting priestly service to ages 25—50 were likely designed to ensure the men were old enough to have a certain level of maturity and strong and healthy enough to perform the necessary physical labor. Priests 50 and over were not excluded completely from service but were limited to less physically demanding tasks.