It doesn’t have to have software that runs in both. All it needs is a toggle to switch between ipad os mode, and mac os mode. That’s literally all it needs. In ipad mode it’s just ipad os. In mac mode its just mac os. Mac mode would require a hardware keyboard and pointer device, not touch screen.
From a financial standpoint i would never bet against them, but personally i haven’t liked the direction they’ve gone since Jobs died. But I’m obviously in the minority, because they’ve sold gabillions under Cook, including brand new product categories like the watch, airpods, and apple music. IMO none of those are particularly special, but whether it’s Apple’s marketing machine or something i dunno, but the fact is those are all new product categories and they’ve all sold very well.