It doesn't need "justification" but it's usually better if it has internal consistency. However I don't think skeletons animated by magic are such a problem. It's how the spell works. No one said that spells and spellcasting is rational or energy efficient.
How does the spell "work" ?
We don't need to know "how", only "what" it does. Magic users in many magical settings don't "know" either. At least in the sense that we understand scientific knowledge. They have practical knowledge how to do magic but not how it works.
There might be some books that attempt to "rationalise" magic and describe how it works in-depth but those usually aren't game settings. Also ones that describe "magic" that is really a technological leftover of a past civilisation. In those cases an explanation would be in order.
In other cases, why is such knowledge required? The fact that people on real Earth in the past didn't have knowledge of what single cell organisms are, didn't mean that those organism didn't exist back then. In fact, humans were able make some use of them a long time before scientific revolution started. Same assumption with magic in different fantasy settings and there is no risk for internal consistency being destroyed.
The effects of magic is another thing. For example all the fantasy worlds that have powerful (and abundant) healing magic but at the same time people treat death and sickness exactly the same way we do. Or alchemists who can really change other metals into gold but they are still poor and not taken seriously. Cases like this are inconsistent and can be avoided.