A formal apprenticeship still includes academic training - either one or two days a week at college, or longer blocks spread throughout the year. I can't speak for software engineers, but the mechanical engineers I know that have finished a German apprenticeship have a very rigorous theoretical background.