Oil is forced out of earth in primary recovery process due to
Natural pressure build-up inside the earth
There is high amount of pressure build-up in the oil well due to layers and layers of rocks over them, hence as well is dug up, it releases oil with great pressure similar to gas coming out of a punctured balloon.