Is a gas often formed along with oil?
Yes, they are all organic molecules. In addition to larger molecules that make up oil, such as hexane, heptane and octane (along with their functional oxygen and nitrogen as well as some halogen containing counterparts) gas is formed. Gas is mainly comprised of very small organic molecules like methane, ethane, and propane. All of the aforementioned molecules come to be from approximately the same process thus you usually find oil and gas together.