That's always a possibility, but I've yet to come up with or hear a workable solution that doesn't cost lots of money or expose a service for abuse.
Right now, all the crates are precompiled so that when you click the run button, only your entered code needs to be compiled. At one point in time, doing that was faster than the original Playground's server-side cache! Speed feels like a very important aspect to the Playground, especially as it is likely to be used as an introduction to Rust to people who just want to play around.
Additionally, the user's code is run disconnected from the outside world. By definition, having arbitrary crates means we have to be able to download the crate in question. Build scripts in the crate can then do lots of things.
The Playground right now is entirely stateless - a Docker container is created and destroyed for every compilation. This leads to very easy management.
Please don't take me wrong — I'm open to suggestions on implementations, and in doing so I'll probably discover "hidden" requirements like "gotta go fast". All the work on the Playground is volunteer, so any complex, finicky solution starts off at negative points.