The message is simple. Sometimes fighting becomes a duty and you have to do it. I dont feel anything negative toward you, but if you one day invade my country I will not have second thought confronting you. It wont be because of hatred, but duty.
In early Islam, many families were broken apart. Muslims did not hesitate to take part in Prophet's side against their own family members. They surely had not hatred toward their own families but a sense of duty.
In Bader war, Ali brought down an enemy and gave him a chance to save himself by uttering shahdah, but he spitted on Ali's face. Ali freed him, because he feared he would kill the man for his own negative sentiments.
And about spread of Islam. Past the conquest of Mecca, his own land. Muhammad sent letters to many kings and governors and invited them to accept one God. This is not surprising for a prophet. Byzantian governor in Damascus killed his envoy. Persian king despised the message and humiliated his envoy. Muhammad did not threat them; he invited them to Islam and said if they did not accept the message they will also took burden of sins of their people. He was responded by hostility.
Muslims made treaties and remained loyal to their signatures. Non muslims on the other hand gave them many opportunities by breaching the treaties. Once a treaty was broken, who knew where the fighting would end.
Islam orders war under conditions. It is realistic and consistent; you cannot wipe out fighting as long as humans have free will, desires and greed. And it is of course better to define boundaries than saying one thing and doing the other.