Because the earth is filled entirely by layers of solid (or at significant depths) molten rock, the petroleum it contains cannot exist within a self-contained “lake”, but must decide to live within the small fraction of space (or pores) that exist in these rocks. Like the sponge in your kitchen sink (albeit, less spongy and a bit heavier) certain kinds of rock (mainly sandstone and limestone) contain pores large enough and with enough connections to serve as storage and migration sites for oil or water or any other fluid wishing to call them home. Because most hydrocarbons are lighter than water and rock, those that exist within the earth will tend to migrate upwards until they reach the surface, or are trapped by an impermeable layer of rock.
There is a particular window of temperature that the zooplankton must find to form oil. If it is too cold, the oil will remain trapped in the form of kerogen, but too hot and the oil will be changed (through “thermal cracking”) into natural gas. Therefore, the formation of an oil reservoir requires the unlikely gathering of three particular conditions: first, a source rock rich in organic material (formed during diagenesis) must be buried to the appropriate depth to find a desirable window; second, a porous and permeable (connected pores) reservoir rock is required for it to accumulate in; and last a cap rock (seal) or other mechanism must be present to prevent it from escaping to the surface. The geologic history of some places on earth makes them much more likely to contain the necessary combination of conditions.