まさか入院中に散髪してもらえるとは思ってもみなかったよ。
The character is a patient in a hospital who's having his hair cut by a nurse who was a hairdresser.
散髪する means "to have one's hair cut". To me, it looks like the nurse is cutting her hair herself and the patient is grateful for that.
"I cut my hair at a/the barber" works as a response to "Where do cut your hair?"; also does not imply you did the cutting yourself. Could replace with "I get my hair cut at a/the barber" with no change in meaning.
"Where do you get your hair (noun) cut (verb)?" would expect a habitual answer. "Where did you get your haircut (noun)?" or "Where did...hair (noun) cut (verb)?" is specific to the most recent cut. "Where do you get your haircut (noun)?" is wrong; would need to be "haircuts" plural.
– istrasci Jul 05 '23 at 06:53