With a firearm (and ammunition) you have the ability to procure food, skins, and bone, start a fire, protect yourself against both man and beast, and if necessary take something from another man or beast. If you have optics on that firearm you have a monocular and a firestarting lens taken care of. A metal magazine could be turned into a blade, some magazine springs could be used like bailing wire, a sling could be turned into cord/rope, ect.

All in all, a firearm is a multi-use tool that if you need it and don't have there is really nothing you could make that would replace it. Even the basics of a knife and fire are easier to create in the wild then something as effective as a firearm. Also, If the survival situation in question, that requires bugging out, is something that effects a lot of people it is best to have some sort of protection as those that are less prepared often turn on those who are.