I'll refrain from explaining technically
exactly what's going on, as that spoils some of the fun! But the most likely reason was that you accidentally used a word that Hal associates with sadness.
I don't have access to Hal 5 any more to find out what they are there, but Hal 6 gets sad from words like "catastrohpe" "death" "depressed" "fire" "flood" "illness" "sad" "tragedy" etc etc.
The trouble is that even innocent sentences like "I'll light a fire in the fireplace" trigger sadness, because of that "fire" word. Do you still have the conversation log of the sentence that saddened her?
Hal looks out for apologies, and you obviously cheered her up! [

]