Very briefly, the history of the labour movement in the late 19th century in Australia is in many ways defined by a tension between urban and rural unions. The older tradition is quite urban, quite specialised trades and crafts unions which are comparatively localised (based around a particular workplace or area). These were often populated by relatively recent immigrants to Australia who were still connected to ‘the old country’ in many ways, and followed their old customs in the new place - miners in Lithgow in NSW were usually of Welsh background, and miners in Newcastle were usually of Scottish background. In contrast, there were more rural workers unions that became increasingly prominent and powerful across the 1880s-1890s and wielded significant power in the labour movement during the early years of Labor - the Australian Workers Union is the most prominent, but the Australian Shearers Union too. These unions were, broadly speaking, less about skilled trades, more rural and more socialist in focus. They were also more inclined to have a nationalist, republican membership that were more likely to be born in Australia.
This is where the spelling of Labor comes in: the rural unions were inclined to spell it ‘Labor,’ because they were republicans, wanting to follow the American example and make Australia a republic, one that didn’t swear allegiance to Queen Victoria et al. And Americans, of course, spelled the word referring to work as ‘labor’ rather than ‘labour’. In contrast, those unionists with more ties to England - the more urban unions usually - were inclined to spell it ‘labour’, what with their ties to the old country, which spelled it that way.
In the early years of the Labor Party in state and then federal politics, the spelling reflected the person spelling it, with different parts of the party - from these different backgrounds - spelling it accordingly as ‘Labor’ or ‘Labour’. Broadly speaking, the ‘Labor’ spelling won out because the Labor Party realised that they could not win elections without rural support - therefore they pushed policies that had more support within its rural nativist base - including support for the racist White Australia Policy - than in the urban unions.
Additionally, the influence of King O’Malley, a Federal politician of American origin, on the spelling has also been discussed in print numerous times, specifically in instituting ‘Labor’ as the official name of the federal party in 1912. O’Malley, while a Federal minister in the Fisher and Hughes governments, played a role in selecting Walter Burley Griffin as town planner in Canberra, and agitated for the instituting of a Commonwealth Bank, and so was an important figure in the party at the time, the kind who could influence the correct spelling. However, I can’t find any primary or secondary source evidence that he influenced the spelling beyond him being an influential American who would likely habitually spell it ‘Labor’ - and I’ve looked at a few different sources. I suspect it’s a tall tale. And clearly the spelling had long varied before O’Malley became a Federal minister, so he was, at most, instrumental in affirming the ‘correct’ spelling, if the tale is true.
Bibliography: Ray Markey’s 1990 PhD thesis and his paper ‘Colonial forms of labour organisation in Nineteenth Century Australia’.