What are code sandboxes?

Why coding agents need a safe place to play, just like we all do.