I've had only a quick look, but I think you've got it right. It seems likely that Joseph was born to Hannah Ward before she married William Hartley.
If you look at the GRO birth index for Joseph's [half?] brother, Hanson Hartley (what a helpfully distinctive name!), his mother's maiden name was given as Ward.
If Joseph was illegitimate, normally you would expect to see a blank space on the GRO index where the mother's maiden name should be. There was a registration for a Joseph Hartley in the Halifax district (would be correct for a birth in Brighouse) in 1843 (no mother's maiden name). This could be a red herring though. Or perhaps William Hartley was his father and the couple already had plans to marry?
You've got Joseph's date of birth from his baptism so there ought to have been a birth registration in the September quarter of 1842, but sometimes people didn't do it, for whatever reason.
As for people lying and getting things muddled on the census and other sources, in my experience it's very common so unless there's something that's a real red flag, it might not be anything to worry about. Some of my ancestors claimed to be widows on the census but actually they were just estranged from their husbands... Others didn't know where they were born and gave different birthplaces on different censuses.