Gravity likes to pull the oil into the oil pan when the engine is not running. With the majority of modern engines using a cam-in-block arrangement, having oil in the upper galleys during startup is critical to the life of the engine. This video is sponsored by FRAM.
If the oil is not there, camshaft bearings can wear along with the lobe and follower that powers the direct injection fuel pump. In some cases, the variable valve train actuator will rattle during a cold startup. Broken timing belts are also symptomatic of oil starvation on overhead camshafts. What keeps the oil in the upper oil galleys is the anti-drain back valve. Like bypass valves, the anti-drain back valve can be in the filter, or on or in the engine.
For spin-on filters, the anti-drain back valve is a rubber-like membrane on the inner side of the can behind the mounting plate cover. The membrane covers the holes where the oil gets through to the filter media and protects against the backflow after the engine is turned off.
As the filter ages, the heat and the contaminated oil can cause the anti-drain back valve to harden. This can cause it to lose its ability to keep the oil in the filter. A high-quality filter is designed to stand up to the heat and oil over extended intervals.
Anti-drain back valves can also be mounted on the engine. On some applications that use a cartridge filter mounted near the top of the engine, the anti-drain back valve is mounted in the housing. Some engines will have a procedure to activate the valve to drain the oil before the housing and filter are removed. Some vehicles will drain the oil through the valve when the cap is unscrewed and the filter is removed.