It probably did restrict him, he still works in the industry of his apprenticeship. The point is, what if he realized two years in, or five years in, that he didn't want to be a programmer?
As I have written elsewhere on this thread, this is why we have state-funded apprenticeships. It is far cheaper than 4 years at college, and it will also reduce costs for colleges that don't have to accommodate students who would otherwise be off at a debt-free apprenticeship.