The answer, I believe, lies within a deeper analysis of the subject than such material usually warrants.
Thanos was a brilliant scientist/intellectual who cares deeply about everyone and everything. His 'harvests' motivated by this and he fully embraced the ends justifying the means. He did not suddenly spring into being as the end product of himself which we see in the film, rather he arrived at that point after a long struggle with his own internal ethos. Gamora, rescued as a child, represented his own lost innocence and his regrets. He explained to the child what he was doing and why. Innocent of maturity young Gamora accepted Thanos 'explanation' of what he was doing and why. At the moment of his victory he 'felt' for all it had cost and the scene with young Gamora is his acknowledgement of the cost but his 'logic' remained convinced that there simply was no other option for ensuring the long term viability and survival of the universe as a whole.
It is also worth noting that in reality, there exists a radical school of thought which espouses the tenet that if 9 out of 10 people everywhere suddenly dropped dead, the remainder would be better off in terms of viability of the planet overall.
I do not ascribe to nor espouse this as valid, but in some small part it is expressed in Thanos.