Because we want it that way.
But, the Crowns (16 in all), are all legally separate. E.g., she has not power whatsoever as Queen of the UK over Canada, the same way as in her Queen of Canada role, she has no sway over the UK. Thus, each country could go to war, or not, with HM acting on behalf of the countries separately.
Canadians are, for the most part, happy with things the way they are. There are a few republicans out there, and some raving Monarchists (like me!), but, most are pretty ambivalent. Things work as they are now, so, there is no appetite for changing things, especially as Constitutional stuff in Canada just drives people nuts.
When Canada became a country in 1867, it did not become fully independent all at once. There were several steps over the next 115 years or so. Some would suggest the last stage would be to have a home grown Head of State, but, while people have suggested this, there just isn't the will to change things right not.
She is still Queen of those counties because they wished to have her as their Monarch even after they became independent. If the Queen of the U.K and N.I declared war, it would not obligate her other realms to assist, she would have to declare war separately in those independent countries.
Because she is so well-loved dear boy. Ask yourself this: Would those Canadian chappies prefer to have a little napoleon Frenchie such as Nicolas Sarkozy as their head of state or would they prefer to have Her Majesty Queen Elizabeth II as their head of state? The answer is absolutely crystal clear, dear boy!
No we don't have to go to war. Although she is head of state technically. I know in Canada that we have full control of all aspects of our goverment. It is more of a cerimonial, historical, and traditional thing now. Although right up until the early 1980's There were certain things that still required her approval. Eventually even the money will not have the queen on it. change and has already started. England and Canada however will always remain allies. winks.
No, while she is head of state, she is head of state as Queen of each respective country ie. Queen of the UK, Queen of Canada, Queen of Belize. Therefore when she declares war she only declares war as Queen of (Insert Nation), not all of them. Though it is very likely all other Realms would provide material support and moral support at the UN.