The most likely reason for this is motivation. In war, motivation is a very important thing and nationalists tended to have much more motivation than the imperial powers.
This was true on two levels. First, nationalist soldiers would have been more motivated to fight. They would often have felt that they were engaged in a struggle for an important cause. By contrast, the imperial soldiers would have simply felt that they were doing a job. Second, the governments or political leaders of the nationalists would have been more motivated as well. Imperial leaders would have found it fairly easy to give up the fight because they would not have cared passionately about keeping their possession. By contrast the nationalist leaders would have been passionate and very unlikely to give up.