The high pitched whine you hear when accelerating hard is a mechanical noise. The connection between the battery and the inverter is basically a plug. High rates of discharge (acceleration) cause the plug prongs to literally vibrate and create the whine. Someone who was close to the entire development process of the Model S told me there was a pretty good debate whether to reengineer the plug or not. Personally I think the mechanical whine is pretty amazing.
I'm no electrical engineer, so I probably cannot describe the dynamics of "why", but that's the source of the noise. It's definitely normal and it's not bad for the car.