I've had my 04, 04. 5 and 05 apart to grease this bearing set... . my trucks are all 4WD and this unit bolts to the a-frame and is very hard to get off. . the machined fit rusts together and you have to use a puller to pull the assembly off... . we grit blasted both surfaces and used a lot of never-seize up re-assembly... . On the 4WD this hub is $300 and is priced about the same on the 2WD units... . so we decided to save money by pulling them off, pressing them apart, cleaning and re-assembly. .
The nut, 23 in your photo is to secure the axle shaft that's splined, to the ID of the hub assembly # 17... . If you don't have a 4WD there is no need for the nut from what I can tell...
I admit that I haven't had a 2WD apart, but the part number I supplied above if from a parts Catalog... I did not have the correct picture... the picture I supplied is from a 4WD hub and you can see the splines were it fits to the drive axle... . I just assume that the correct picture will bolt to the housing the same way but will not have the splines... .
Hope this helps and makes it more clear.....