When Finn describes the Starkiller to Leia in the novelization of The Force Awakens, he mentions that the weapon is also the First Order's headquarters:
“It’s located on the world that serves as the First Order’s main base,” Finn told her. “I’m sure that’s where they’ve taken my friend. I need to get there, fast.”
This strikes me as an incredibly stupid move on the part of the First Order - they must have known that, once they deployed the weapon, it would become the most important target for the Resistance fighters. Even if the Order thought the chances of the Resistance succeeding were small, it still seems like an obviously terrible idea to give the Resistance such an opportunity - instead of having to destroy the Order's headquarters and its weapon in two separate operations, they can do both at once.