I guess it doesn't really matter THAT much if you're training intensely, deplete glycogen and are on a caloric deficit/ if the junk food doesn't exceed your maintenance levels. The real issue is getting in QUALITY calories that will aid you in gaining lean body mass, not eating junky calories that are nutritionally unsound or contribute nothing to your bodybuilding efforts. Of course it depends on what junk food we're talking about, if there's a high amount of fat and sugar then the insulin spike will probably lead to lipogenesis and eventual fat gain over a period of time. If it's just carbs, then there's a chance that it will just be used to refill glycogen to be used as energy, but if you spill over then that's fat tissue for you.
Peace.