When authority figure levels a serious accusation of wrong doing against you, particularly if it involves harm to another person, your thought process goes something like this ( based on individual experience).
Eh? What do you mean? You mean you think I've done this? What do you think I did?
(Depending on how you ask questions, and how clear a communicator the accuser is, you may get further information. Or, depending on the position of the accuser, you may get told the details will be provided by others more qualified, or that it is dependent on further investigation, and little may be provided in terns if time scale).
Depending on the situation, you may well go into a sort of shock. You try to process what is being said. If you are sure you are innocent, you may assert that, and it is just kind of ignored and over-ridden by procedural waffle. A system has kicked in, and you are now in it. You, as the person you believe yourself to be cease to exist in meaningful terms.
There is a cognitive dissonance to resolve. Until this moment, you have had trust in those accusing you. They are professionals in authority. You rationalise to a degree that they're just doing their jobs, they will soon figure out it's a mistake, something will show up that blows their theory out of the water, and yes, you can even feel guilty that the situation that has lead to this point is causing such alot of unecessary bother, particularly if the accuser displays discomfort or awkwardness or the air if "this is hurting me as much as it's hurting you". If you are naturally conflict averse, submissive or a people pleaser, you may have all the defensive capability of a rag doll cat, and will actively stamp on your anger.
This clinging to hope that things will magically right thrmselves if you just stick to the truth and "let them do their jobs" can persist dangerously. You may be advised to get legal representation. You may balk at that. Seems like overkill in a situation where it's an obvious mistake, and it will be righted soon enough.
(In child protection scenarios, you may be advised by your accusers that legal representation is not necessary, and will complicate matters. However, I would argue that this scenario does demand legal representation, just as much as in criminal court. While most people have a rudimentary grasp at least if criminal process, the family courts are a whole other, and complex can of worms, just as an aside).
When you do get legal advice, feeling very much as though you are in the upside down, all sense of logic and security stripped away in the length of time it took to say one accusatory sentence, and you look to your solicitor as some sort if saviour, you get a very rude awakening. They know the system, those who work within it, those withvwhom they go lodge meetings, play golf, socialise with. Their advice may well come from trying to dovtheir best for you, but how far they will put their professional head above the parapet is balanced by their grip on their future career. If you strike out on your own, get angry, do anything "unadvisable" you will be told off, because you are making their job harder in what already seems an impossible situation.
A good solicitor will be very honest about your chances. Remember, the system is adversarial, once it gets into a court, it's winning versus losing, because most evidence can be ambiguous or interpreted by either side to achieve that goal.
The myth persists that no-one ends up accused in court just because of a series of unfortunate events, no smoke without fire, if you will. But it does happen, and it's quite the unpleasant revelation when it happens to you.