The first thing that comes to mind is simplifying the identification of a device type, without the necessity of looking up a device list name or updating the list with each new device that gets released.
Foldables have a different UI which often requires different requests to the backend. They need to support both narrow-screen and large-screen formats for content, and you usually want to avoid having critical UI elements fall on the hinge for fairly obvious usability reasons.
That should all be abstracted out to the operating system, not dependent on checking for specific devices. Any app should be able to accommodate different screen/window sizes and safe areas.