The picture shows what we used to call a "zipper" in the tire business (at least, the tire business in my neck of the woods

). One or more of the radial plies has torn/split, creating what appears to be a "bubble". This is indeed caused by an impact to the tire, or in some rare cases can be caused by extreme damage during mounting to the the bead area that actually penetrates the chafer layer. Very rare.
It is not air between the plies - the airtight compounds are innermost on the tire, inside the radial plies. The compounds outside this layer are not airtight. Loss of integrity in the airtight layer in the sidewall will result in a flat tire relatively quickly.
In any event, you are doing the right thing in replacing the tire immediately.
Cheers,