It sounds like he did something disrespectful, infuriating and unsettling. Maybe it was to teach you a lesson, but that lesson wasn't clear and, therefore, useless. All it did was make you worry about him and question his trustworthiness. I'd be watching him like a hawk to see if this is a pattern of behavior because, if it was, I couldn't deal with it.