Why buy a Magic Keyboard for an iPad when the iPad has an on-screen keyboard and a laptop costs less than an iPad Pro with a Magic Keyboard?
A Magic Keyboard frees up screen space and lets most people type faster and more accurately than on the on-screen keyboard. An iPad with a keyboard still beats a laptop for some people because of its touchscreen, Face ID, Apple Pencil support and portability. But if a laptop fits your needs, buy the laptop.