At the moment, I don’t think Hillary believes she’ll win. She’s in it now and she’ll go down in flames rather than drop out and possibly have another woman take her place.
I think she's used to that second one by now, possibly by consequence of the first. So much so that she decided "when in Rome..." and struck up an acquaintance with Mrs. Weiner.
Unstated is what the State Department or CIA know about SAP programmatic information leaked to Huma, either via air-gap-jumped emails or pillow talk.