The reason I can say that x is an instrument and y isn't is because if everything that makes a sound is an instrument, then EVERYTHING is an an instrument - that's nonsensical. If everything is an instrument, then 'musical instrument' might as well be a synonym for 'object' or 'thing'. While you can use a rock to create a beat, even if you're using it as a musical instrument, that doesn't necessarily MAKE it a musical instrument. I can use a stick as a sword, but that doesn't make it a sword. I can us a toilet roll as a telescope; it's still a toilet roll, not a telescope. I can use a log as a pillow; it's still not a pillow. Using something as something that it isn't doesn't make it that thing.
By similar argument, even if you don't use a guitar as an instrument, it still is an instrument even if you're using it as furniture/an ornament.
Therefore, I put it to you that there is a specific divide between a 'musical instrument', an 'object which makes noise' and a 'machine that makes music'.
And a MIDI keyboard contains samples of NOTES from different instruments/sounds, not samples of songs, which is what a turntable uses, and therein lies the difference - one uses notes, one uses songs. It's the difference between a painting and a collage - one has nothing to begin with, the other has something that it changes.