YABU - you weren't contactable, your DD got scared and her friends mum did the responsible thing of checking in on her.
You say you checked your phone an hour into the event, so DD had to have been alone for at least 90mins at that point, as you said the venue is 20 mins away, if not longer so you were uncontactable for a long period of time when you're a scared 12yo home alone in the dark.
For all you know your DD was messaging with her friend over the course of the evening as tweens do; something spooked her - noises in the dark, sounds in the house, watching something scary on TV etc; she tried to call you and got no response and so messaged her friend that she was scared and you weren't answering; her friend told her mum that DD had been trying to contact you for an hour and had got no response and was scared so she offered to come over; they came over, DD showed the calls/messages she had sent over the course of an hour that had gone unresponded to and DD said you weren't due home for hours.
At this point friends parent either has to stay at your house until you come home (and hope nothing untoward has happened), leave a scared 12yo home alone or take her back to her own house. It's not her place to interrogate DD as to why she hasn't called other people or gone elsewhere - 12yo logic isn't always the best or most rational, especially if they're in a bit of a panic - and it's not unreasonable for her to choose the most convenient option for herself and take your DD home. Personally if I was the friend's mum as we were getting in the car to drive home I would have told DD to message you to say she was at my house and then I'd have messaged when I got home to say DD was safe at my house and to let me know everything was OK.
My DD is 13 and I would, and have, left her home alone when I went to an event but I am always contactable - my smartwatch is connected to my phone so even if my phone is on silent I get alerts of all calls/messages on my watch so it's impossible to miss them - and I always remind her that if, for whatever reason, I don't reply she should contact ExDH or another family adult if necessary. She knows the speech off by heart now and recites it with me as I'm walking out of the door, but I still make sure to say it just in case.
ExDH and I share custody 50/50 and we are in regular contact so if one or other of us is going out in the evening when DD is with us (especially if it's anything out of town so we won't be able to get back quickly in case of emergency) then we will usually send each other a message as a heads up just in case - so if I was going to a gig I'd message ExDH "Just an FYI, going to <town 20 min drive away> to see a gig tonight and should be home by 11pm, just in case DD calls". That way he knows to keep an eye on his phone in case DD calls him, and if he's busy (eg he's planning on a trip to the cinema where he can't keep checking his phone or he's out of town too) then he will let me know so I can tell DD to phone my parents/siblings if there is a problem.