Oh, it makes perfect sense in terms of gameplay. Being able to switch weapons adds the potential for too much cheese with the more powerful weapons late game and removes a significant portion of planning ahead. The point is to have your units focus on their combat roles, and your weapon is a key part of this.
Being able to switch would in fact remove a large portion of roleplay and tactics. It removes the need to choose. An archer can still fight in melee if you choose, there isn't really a penalty. You can get powerful ranged weapons.
The idea also is ranged weapons typically weigh less, the fact that they are ranged gives to the idea that they will require less armor and hence will fire faster and be able to move around the battlefield more freely.
I've sometimes wished I picked a different weapon for a battle but never really between ranged and melee though, mainly which top tier weapon I gave to whom. This is one of those gameplay elements that just need time to work with. Plan out your characters more, if they can't cut it in melee...do what you can to keep them out.
That said, there needs to be a better way to set up units (formations) especially if you are the attacker.