You're close as well. You kill things and take their stuff in D&D because they oppose and attack you, or are labeled monsters. Alignment isn't really very relevant to that. If a band of mercenaries(most of whom are probably not evil) is attacking the castle of the lord that hired you to defend it, you kill them and take their stuff.
Things are labeled good, evil or neutral in D&D because they behave in a good, evil or neutral manner. Not to justify killing them and taking their stuff. Simple opposition is all it takes in the game for the killing and looting.