The moral issue comes because these jobs are tied to people's livelihoods and ability to provide essentials like food, housing, healthcare, etc for themselves and their families.
So is the company doing a morally good thing when it provides the ability for someone to have food, housing, healthcare, etc? If not, it doesn't make sense to blame the company for eliminating jobs if they also don't get credit for employing people for however many years.
In a system where those things can't be taken for granted: yes. That's why people talk so positively about job creation, and we praise job creators. It's also why we shame and indeed ban companies that don't do those things: for example companies that pay below what is considered a minimum wage.
Of course, we could also discuss whether things like housing and healthcare should be tied to an employer in the first place, but this is a different discussion.