Typing is subpar next to a Mac so by the time you put the case on it and are in similar size/weight class, for same/MORE money .. why bother with iPad ?
There's no pen input on a Mac, it's only really usable in one orientation and so sucks for reading more than a page or two of a PDF. Tablets are WAY more flexible in form factor. Apple unfortunately cripples the software, but I'd rather have a device that's 100% better at pen input and bunch of tasks that's 30% worse at typing.
The single purpose nature of the iPad makes it pretty good for quite a few tasks. I find it much easier to stay focused. I’m not saying that justifies the cost, but seeing as I have one anyway, it’s what I use for a lot of my writing like tasks.
Of course, you can now multi window in iPadOS but the experience is awful enough that I don’t.
Because it can do both. That may not be valuable to everyone, but it is a beneficial feature for many people. Also, Apple's keyboard case has a fantastic keyboard and trackpad that is a pleasure to type on.