Probably a lot goes into it, like how the person worked with their front office (NFL is a small circle, people talk), how much potential they have shown since losing their HC gig (McDaniels is one of the top coordinators in the league), and I am sure other intangible factors. For example, McDaniels was young and immature when he took over the Broncos. Many felt it was just too soon. Since then, nearly everyone whose worked with him has said how much he has matured and developed. There is no questioning that he is a top offensive mind. Its worth rolling the dice to see if maturity has transformed that offensive guru into head coaching material or if he is destined to be a Dom Capers/Dick LeBeau figure (great coordinator but simply not suited to be an HC). Plus the Belichick factor has to be intriguing to GMs. McDaniels is viewed by many as Belichick's most devoted student, whom Belichick has given the most time to mentoring. That alone almost makes it worth a second shot. Who wouldn't want to take a chance on the protege of the best coach in the game's history? And not for nothing, but wasn't McDaniels ultimately validated in the Cutler trade when Cutler turned out to be a whiny diva in Chicago too?
Also, while perhaps unfair, Spagnulo is old. He is 57. Bruce Arians took over The Cards at age 60 and is already talking retirement next season. Gary Kubiak is 55 and retired due to health concerns caused by the stress of coaching. Being an NFL head coach is a tough job that drains a lot of people. During the regular season, you are working 16-18 hour days in a high pressure, high stress environment. Very few fall into the category of Belichick and Coughlin where they can keep doing this in perpetuity forever. That takes a special kind of guy. So maybe GMs just don't want to roll the dice on someone who will only last 4 or 5 years, even if things go good. Flip side of that, maybe Spags doesn't want the kind of stress that comes with being an HC. He has the next best thing (a coordinator position) with none of the headaches and blame that comes with being top dog.
Finally, McDaniels did pretty bad in Denver, but he went 8-8 with Kyle Orton under center. That's not too shabby. What he never did was have a team that went 1-15 or 2-14. Spags had a season of each. Just one of those would be enough to kill most coaches careers. 2? Forget it.