Hind sight being what it is, it could have been a good client, a great frequest repeat customer, provided... specific ground rules/accomodations are agreed to and enforced, ie: the child is not present for obvious reasons. I used to do work for an adult assisted living facility for mentally handicapped individuals. The care givers would take the residents outside, to a park, a different resident home location while I cleaned.
I understand your knee-jerk reaction and honestly, even with my past experience, I might have bolted too. Mainly because he was a minor. With today's society as letigous as it is, I would be nervous that the kid would run screaming naked to his parents making false accusations about something I did or said or God knows what else... and then I'm fighting to clear my name for something I didn't do or worse lose my business.
Don't feel bad for how you reacted.
The question I have, was the child's mother in the room when the sprinkler show started or was she in a different room? If she was, then yes, a frank conversation around expectations needing to be met in order for you to your job could have been had. If she wasn't aware... then you walking out the door for no apparent reason to her, might have seemed quite unusual.
I would have finished the inspection and given her an estimate high enough to cover my time, additional specialty chems or products needed to do the job, profit plus another 20%. Sounds like they were wanting you to bear the brunt of their problem child's issues, at regular prices. Nothing about that job would have been normal. Then, they say... Thank you Peter for coming out but your prices are too expensive for our budget. Rather than you leaving ubruptly with little explanation and appearing a little unprofessional (in their eyes, not ours of course)