Why do interviewers ask seemingly crazy questions?

Why do interviewers ask seemingly crazy questions like 'How many windows would you say there are in New York City?' or 'If you were to invent a musical instrument what would you make?' What are they looking for?

Essentially, they want to see how you react under pressure, or with strange inputs.

These questions you quote are for two purposes. The first is to see if you can deal with ambiguity, so to react with a definitive number would be clearly wrong, as probably no-one knows the exact answer, but to take an educated guess at no of buildings and windows per building and multiply them up would be a good approach. If you can do this with good humour and staying calm and keeping eye contact, that would be a good answer.

The second question is designed to see how creative and calm you are. Can you think of a potential new musical instrument, on the spot, without getting stressed and anxious. Those who are very creative would definitely come up with a brand new sound and a lateral way to create it. Those who are more constrained in their creativity might think of a development of an existing instrument, e.g. a xylophone on its side to put on your like an accordion!

You’re right to ask yourself, why are they asking, what do they want to know, and then plan your answer accordingly.