"Because if Harry here --" Mr Malfoy shot Harry a swift, sharp look, "and his friend Ron hadn't discovered this book, why -- Ginny Weasley might have taken all the blame. No one would ever have been able to prove she hadn't acted of her own free will..."
I don't understand the usage "why" in this context. The close definition I can get from dictionaries is:
exclamation
People say 'Why!' at the beginning of a sentence when they are surprised, shocked, or angry.
But in this case, I don't see Dumbledore was surprised, shocked, or angry specifically.
How should we understand the use of "why" in this sentence?
P.S. My question is based on a specific context. I don't know how this definition could fit the context.
-- From Harry Potter.