The egg grew out of Bishop's torso inside his cryotube. Ostensibly, this was due to being contaminated with genetic material when the queen impaled him. Later on, the Anchorpoint scientists were able to culture scrapings of the same material from his lower half and clone alien eggs from that.
My personal spin on the Gibson origin, which appears to be the script that pre-dated them all, is that this genetic material oozed into the subflooring of the Sulaco's landing bay where it congealed, then grew slowly out of the floor itself and into the strange position where we saw it after it hatched.