I imagine the discovery that Rhoda likes being pat on the head involved Diane doing it once without thinking, catching herself, apologizing, and Rhoda sheepishly encouraging it.
TO BE CLEAR, however, Rhoda won't accept them from just anyone. She has to know and trust a person. I'm not sure what all instructions one should follow when petting a dog or a cat are applicable to Rhoda, but surely some of them are.