Apple didn't invent tablets or smartphones, wasn't the first company to come out with them, and had some flops before coming out with successful versions.
Once they got it all worked out in next versions, however, they obviously nailed it, had awesome judgement and execution, and gathered up enormous market share.