You only see the page with traceback in development mode, while in production mode you see a standard error page (located in public/500.html) which just says an error occurred.
This is meant for security reasons, and it's not, of course, limited to rails: all web application frameworks do the same, as the backtrace can disclose sensitive information (it sometimes happen that you see an error message on a web app displaying the db connection string, or some password, or the like; well, you don't want this to happen).
In development mode, on XHR calls, you still receive the backtrace (I use firebug to debug my apps, so I just copy it and paste somewhere).
In production mode you can handle XHR errors from within the ajax call, by explicitly set a function to be executed on error by setting the :failure param of functions like remote_function.