You can take RAW photos with your iPhone, you just can't do it with the default Camera app. Apple does allow third-party apps to access the hardware and software needed to take RAW photos, so you can use one of the many options to do it. RAW photos provide a lot more flexibility than HEIC or JPEG photos, but with a much larger file size. Using a third-party app means you can keep using the Camera app for regular photos and use the other app when you want to take RAW.
Link: Apple’s List of Raw Photography Apps.