It is not the state that requires enterprises to have them, but the development of enterprises needs talents and is willing to invest experience and resources to cultivate them, so there are apprentices, and apprentices generally exist in the technical industry.
So it naturally comes from the law of enterprise development.