Did a bit more checking up - we can forget the idea that Benjamin adopted Irish Jemima, because he'd died eight years earlier in 1860!
Also, looking at the dates, Irish Jemima must have been pregnant before setting out for Australia. So this makes it very unlikely that William Hamilton was the father and the naming of the child as William John is pure coincidence (and bear in mind also these are very common names, so it's not all that big a coincidence).
I also doubt if the Beatties in Australia would claim Irish Jemima with a child born out of wedlock as their daughter and then announce this in a newspaper marriage announcement. Sydney at that time was still a relatively small (so everyone knew everyone else) and with a fairly conservative and 'respectable' middle class - I seriously doubt if folks would have tolerated such a thing. Therefore, I think that when Jemima is announced in the wedding announcement as the daughter of Benjamin Beattie she really is the biological and legitimate daughter of Benjamin Beattie.
Thus, I think on the balance of things that Irish Jemima is not the spouse of William Hamilton. Instead, the spouse is Jane E Beattie, who for reasons now lost, decided to call herself Jemima (this isn't all that odd a thing - e.g. one of my other ancestors was born Vivienne Irene, but always seems to have called herself Brightie). All that is required to fit the evidence (the formal NSW records, the newspaper announcement, etc) is that Jane E Beattie later called herself Jemima. And as I've just said, this isn't all that odd a thing to do.
My hunch on what happened to Irish Jemima is this. She got pregnant in Ireland. To avoid scandal, her father packed her off to Australia to have the child. There are a LOT of Beatties in Sydney at this time, and it's not impossible that there was a close relative out there. Jemima was met by Sarah on the last leg of the journey and they went to Sydney where William John was born. Irish Jemimah then went back to Ireland or otherwise simply disappeared off the radar. I think she quite possibly went back to Ireland and the child was adopted, possibly by a relative. Indeed, it's not impossible that 'our' Beatties were the adopting family. I've a shrewd suspicion that as Benjamin and others prospered, other family members were invited to come and live in Australia. There's the occasional mention in the Sydney Morning Herald about the death of a Beattie, 'late of Dumfries' (i.e. where Benjamin Beattie was born), which tends to support this idea.
Incidentally, absolutely the only marriage of a Jemima Beatty (or Beattie) I can find in NSW is the one to William Hamilton.
If this sounds plausible, I can gladly send you what I know about Jane E Beattie (and more particularly her father, who makes for interesting reading).