There are various levels of self deception that almost everyone subscribes to.
A pretty high level one is that our jobs are meaningfully making a positive difference in the world, when in fact, most white collar jobs are just producing bullshit to grease the corporate wheels of modern society. Most people don't like to admit that though, so we tell ourselves little lies and go along with the corporate narrative. That's what you experienced.
But it goes deeper the more truthful you try to be. Down near the bottom of this pile of self deception is that humans are making the world a better place, when in fact we're ruining the world, causing environmental damage at an unprecedented rate in geological history, all the while exhausting the readily-accessible non-renewable resources, like hydrocarbons and minerals, that'll make the chance of a better future civilization on Earth highly unlikely.