JavaScript is a language just like any other language, such as C and Java. You can run Java on your desktop PC, and on your server as well. In the same vein, you can run JavaScript just fine on a server.
Node.js is one popular asynchronous I/O library that uses the JavaScript language. It runs extremely well in a server environment as evidenced by GitHub and Klout.
The same origin policy is only applicable in browsers, i.e. at the client side. The sandbox is still in the language in the sense that you probably will not hit a buffer overflow. It is not the same sandbox as implemented in browsers, that is, no access to sockets, and no access to files.
The bottomline is to think about JavaScript as a generic language.
The drawback from a programming point of view is the JavaScript interpreter runs single-threadedly. There could have been improvements in this area. From a security point of view there are likely no issues to worry about.