We study the effect of apprenticeship programs on firms and welfare, using novel administrative data on the universe Colombian manufacturing firms with at least 10 workers, and a unique reform to apprenticeship regulation. The reform simultaneously establishes apprentice quotas that vary discontinuously in firm size and lowers apprentices' wages. We begin by documenting that the policy is successful in increasing the number of trained apprentices more than threefold. However, the reform also induces significant firm size distortions driven by heterogeneous firm responses. In sectors with high skill requirements, firms avoided hiring apprentices decreasing their size and bunching just below the regulation thresholds. In contrast, firms in low-skilled sectors, increase their size and bunch just above the regulation thresholds in order to be able to hire more apprentices. As a consequence, the regulation results in most apprentices being trained in low-skilled sectors. We develop a simple theoretical model featuring heterogeneous training costs across sectors in order to rationalize and quantify these empirical findings. The key insight of the model is firms that train apprentices incur in an opportunity cost of spending time teaching and not producing. As training in high-skill sectors takes longer than in low-skill sectors, firms in high skilled sectors will avoid apprentices while firms in low-skill sectors try to get as many as possible. Finally, we use the model to analyze the welfare consequences of the regulation and study counterfactual policies.