First, cost: recording to an onboard SD card, commonly called "edge recording", is the most cost effective way to capture recorded video. It is not, however, the most reliable. SD cards are known for failure. For more reliability, consider an NVR from a reputable manufacturer with a solid track record and significant warranty and technical support capability. For even higher reliability, consider an NVR that offers RAID protection. Again, cost goes up as you increase reliability.
Second, situation: there are situations where the security camera may not be connected to a reliable network or a may not be connected to a network at all. An example is a covert application where law enforcement or the HR department may need to deploy a camera where one is not normally present. Another situation is where a network connection is not reliable. In both of these examples SD card recording may be a must-have capability.