I actually think it is due largely to tradition. I do not buy the shooting deserters argument. If i were to have to shoot a deserter, I would take an assault rifle thank you very much. After all, you are trying to engage a highly trained and well armed soldier.

Another theory could be that in addition to tradition, they are issued with pistols because the army recognises that officers usually stay behind in HQ to do their planning. It would be an embuggerance if they had to lug their rifles around when giving powerpoint presentations.