The primary purpose of an SNF is to provide specialized care and rehabilitation services to individuals recovering from illness, surgery, or injury, as well as those requiring long-term care for chronic conditions.