This question has already been answered, but there's a tiny piece of intuition which I'd like to make explicit: If you're thinking about a manifold in the PL world, surgery might look a bit arbitrary- why cut out and glue in those pieces and not others? Surgery's natural setting is the smooth world, where you're equipping a manifold with a Morse function $f\colon\, M\to \mathbb{R}$, and using information about critical points of $f$ to encode $M$. It's actually a bit more involved than you might think it might be, but when you pass a critical point of $f$ you add a handle to $M$, and the boundary changes by surgery. For details, see answers to <a href="http://mathoverflow.net/questions/70248/searching-for-an-unabridged-proof-of-the-basic-theorem-of-morse-theory">this question</a>. So really, surgery isn't an a-priori construction which somebody pulled from a hat- it is rather an operation which stems naturally and inevitably from Morse theory.