Honestly it doesn't even really matter anymore. We should've phased out fossil fuels about 30 years ago to have a chance. Just going to enjoy the next 10 years as the climate absolutely shits itself
Letting ones own company go bankrupt and squeezing the last bit of money out of it is a perfectly legitimate business plan. The money is paid out to the investors, who then can use it to invest into something with a better business model. As far as I know only Ørsted has successfully transformed from an oil company into a renewables company.
Extraction is not free and most cheap conventional oil suppl has been used up or it is in politically difficult countries. Hence unconventional sources like fracking and oil sands are being used. However they are also more expensive, hence they can not compete. If the cost of production is higher then the oil price, then nobody is going to do it.
Locking up oil supply helps too, as it drives up the oil price and makes adoption of alternatives more likely.