Student or Learner
"The main reason that we published this is because we thought that this was an important lesson."
Is this good English, please? How about "the main reason for us to publish..."?
Yes, your alternative would work, although that we published is better, because it lets the reader know that the company did, in fact, publish whatever it was they're referring to.
The main reason for us to publish does not actually say that they published it, just that there was a main reason to do so.
Were I the author, I think I'd write:
'The main (or, 'primary') reason we published this is that we thought it was a good lesson.'
I hope this is helpful,