Depending on what Pokemon you are training, it will level up differently. Considering that your Electivire was on a higher level, it received more Experience while your Level 10 Bagon only received a small amount of Experience. It basically all depends on the Nature and Level of the Pokemon.