Trying to find info about my Uncle James MacGregor

I’m a bit confused. James was in the mercantile navy and dies at sea, but he’s dressed in an army uniform? Is it possible that James is not the guy in that photo or that the family lore is not correct?

When did he come to Australia? Was he in the UK merchant navy before coming to Australia? And in which Australian state did he reside?