war
/wôr/
noun
- A state of open, armed, often prolonged conflict carried on between nations, states, or parties.
- The period of such conflict.
- The techniques and procedures of war; military science.
Videos
In American English, 'r' can change the vowel before it. For many speakers, beard does not have quite the same vowel as either bid or bead, father does not have quite the same vowel as farther, and cord does not have quite the same vowel as cawed.
Depending on the speaker's dialect, the vowel of cord and war can be either /o/, /ɔ/, or somewhere in between. Further, it can have r-coloration, which means that the vowel is modified so that it sounds like the vowel and the consonant /r/ are being pronounced simultaneously; see this Wikipedia article on r-colored vowels. Thus, while some Americans have exactly the same vowel in war and talk, most don't.
Pronunciation
It’s because in America, unlike in Britain, the homophone-pair war, wore usually have the tense-o vowel /o/ of woe instead of the lax-o vowel /ɔ/ of talk. So wore and war sound like woe with an R tacked on the end here.
The same thing happens with words like lore and the homophone-triple pour, pore, poor: those all have the same tense /o/ vowel as low and Poe instead of the lax /ɔ/ vowel of law and paw. So lore is low plus an R not law plus an R, and pour, pore, poor is Poe plus an R not paw plus an R.
Warning: US /ɔ/ ≠ UK /ɔ/
Keep in mind that just like how the American /o/ phoneme is different phonetically from the British /o/ phoneme, the America /ɔ/ phoneme is also not the same phonetically as the British phoneme /ɔ/.
Our /ɔ/ is (usually) lower in the mouth than theirs is, so closer to phonetic [ɒ] than to phonetic [ɔ].
Spelling
But if you’re asking merely about spelling, not pronunciation, that’s completely different.
As I earlier mentioned in comments, the OED explains that this is because of the w‑ more than the ‑r, but this varies by speaker.
So war, warden, warren, warranty, warrior, ward, reward, warble, warn, warm, swarm, warship, dwarf, wharf, wart, thwart have tense /o/ for the majority of us who have neutralized the tense–lax contrast before /r/ and so simply always use the tense one (also called the "close" one, or sometimes the "long" one). In the UK, and in a very few remaining places in the US, the lax one is also possible there, but not for most of us.
In contrast, many speakers have lax /ɔ/ in want, water. A few have lax /ɔ/ in Lawrence, lawyer but most have tense /o/ in those two words. Plus some speakers even split homophone-pair warn, worn.