What is the full sentence? All I can say is that tuning pins were necessary to tune old pianos and that in your quote, something is being compared that is a necessity to something else 'like a pin to a piano'. Another saying is 'like a horse and carriage'.