How can there be a milchemes reshus where we’re not defending ourselves just attacking others to conquer them? The Torah sounds like Klal Yisrael can just go to a city, offer it peace, if it does make peace, they serve us and give us mas, and if it makes war, we kill all the zecharim. How can we understand that?
You are asking an interesting question. I heard an interesting ide regarding this from R’ A. Wittenstein, that the place we find Milchemes Rishus, is by Dovid Hamelech, that he expanded the boarders of Eretz Yisroel. You are asking, what is the rationale that we should be allowed to just take over another country? The answer is that the Bais Hamikdash could only be built after, Klal Yisroel is settled securely in the land, (see Rashi Deutronomy 12-10,11, Melachim I 5-17) therefore it could not be built until all of nations that were in the land were eradicated. Only after the nation is settled in a secure way can the Bais Hamikdash be built. During the time of Dovid Hamelech there were areas that he felt had to be captured for the benefit of securing the sovereignty of Klal Yisroel in Eretz Yisroel. As we see in Brachos 4b, that even after the need was established, it needed the consent of the Sanhedrin and the Urim U’tumim, which essentially was that it had H-shem consent.