onions/shallots

I just got on here because I thought it was going to answer a question for me. I registered and could not find a “question” box so I’ll ask it now.
In a recipe I just looked at there was onion and shallots at the same point of the recipe. I have always used shallots when I want a milder onion flavor. Why would you use both:?

Thanks for the nice tips and you can definitely use shallots for a milder taste like onions. I use it but onions are no doubt more spicy.