It seems that we shouldn't make a suggestion to the dev clean up the code because we shouldn't look at the code at the first time.
And what you are asking is very very hard to speak because there are many many biomes and many many conditions. If there is no sufficient reason, no one want to read every line of the great SpawnNPC function. (2000+ lines as of 184.108.40.206)
As far as I can say, events and airborne and spider cave and aquatic mobs have precedence(mostly..) But the whole spawning dictionary must be made up before answering your question. So you asked a really big question. Please provide a sufficient reason before you ask such questions.