I am not sure I can tell you why it's necessary and why we need it. I'll try my best, but I may be wrong, so don't fully rely on my explanation.
Whenever you try to use APIs that use HTTP, Chrome and perhaps other browsers are blocking (http?) requests cos of security reasons. By using the special server you're allowed to get that information you need from the API.
Try removing the server from your code and open your console on the browser you're using, and you'll see a very specific error. If you want to know more information, the best thing you can do is google it.