Oil pans seem like they would be these simple buckets that hold fluid from spilling all over the place. There is a lot more to an oil pan than that. They obviously hold oil like a bucket would. Oil pans also control oil. Race cars especially need purpose built racing oil pans to hold oil near the sump or pickup. Acceleration and turns can push oil away from an oil pickup causing engine failure or excessive wear, depending on the amount of time that oil is not pumped through the engine. Racing oil pans are made to counter the effects of G-Forces such as a drag car might experience at launch. Circle track cars also can push oil away from the oil pickup as they go through the turns. Professional oil pan builders use baffles and the shape of the pan to control oil and keep the oil pickup submerged and pumping oil.
The vehicle that the pan is going into is a major concern, not only for the engine application, but also space requirements. Different vehicles have different frames, crossmembers, headers and exhaust, suspension components and other objects that can get in the way of an oil pan. Oil pans obviously have to fit a particular engine along with a proper fitting oil pump and oil pump pickup. The oil pan is one major component in an oil system