It is perfectly justifiable for Cortez to have killed Aztecs for multiple reasons. For starters, the Aztecs were the first to attack the Spaniards, not the other way around. Additionally, the Aztecs had an annual ritual where they would kill 10% of their entire population (around 250,000 people) in a massive human sacrifice, making it justifiable to work to alter that sort of culture. Another thing to note is that it wasn’t Cortez or his men who were killing most of the Aztecs directly, but smallpox, a European disease that the Aztecs have never seen before and were thus defenseless against.