Minecraft wiki entry for Horse, associated text: When spawned in any way except breeding – for instance, using commands, spawning naturally, spawning as part of a skeleton trap, or using spawn eggs – horses are assigned their stats within certain ranges.