Typically, employers expect more in return for your salary than engineering output - they pay for employees to be engaged with the business, learn it, become subject matter experts, so that their value over time increases and they deliver more than just the engineering. When all your need is engineering output, you hire contractors.
At the same time, you are correct that it doesn't matter who is typing it. One of my favorite setups I've worked under is where throwing it over the fence is explicit - where a small team of employees each has their own small team of contractors. The management doesn't care who does what, as long as the work gets done, so we were free to parcel work out to our contractors as we saw fit, and that the institutional knowledge stayed baked into our heads.