Mosques have a lot of good qualities and benefits. The mosque is the most beloved place by Allah. To maintain a connection with Allah, s.w.t. will schedule time for prayer.
Prophet Muhammad (ﷺ) is making it clear to them that returning to that old lifestyle of disbelief is just like being thrown into the fire because that is the actual consequence in the afterlife for those who disbelieve. Similarly, a Muslim who goes back to a lifestyle of sin and disobedience after having repented is like he threw himself/herself into the fire.