The hardware has a huge impact on the performance of the OS. You will find that the same machine may work fine with certain Linux distributions, while it may not work properly with others. Sometimes they're small annoyances, sometimes they're more significant.
At the end of the day, you'll get the best guarantees by purchasing from a hardware manufacturer that advertises Linux support for the device. The same is true for Windows; it just so happens this already is the default for most vendors. The same applies for other operating systems, including on the smartphone space — anyone remembers Firefox OS, or Blackberry?
Mmmm, I'm not so sure about that. Microsoft has dropped the ball more than once, sometimes with pretty significant consequences, including data loss. I've even seen first hand devices that came without Wi-Fi drivers (just like in Linux!
).