My former student Nick is a talented actor. He performed in several plays growing up, and he knows how to improvise his way through onstage catastrophes such as missed lines, malfunctioning props and wardrobe, and unexpected disasters.
Improvising should be an important part of pianists' skill sets, too. Nick discovered this when he chose a challenging piece for a LHS's annual classical recital. He had worked on Kabalevsky's Sonatina: Allegro, opus 13 #1 for some time, but with two weeks to go, the memorization was still rough.
So I told him to improvise. As a 20th century composer, Kabalevsky created some dissonance in his music, and I figured Nick could probably add a little more and get by with it. And that's exactly what happened the day of the recital.
Students should work hard to perfect their performance pieces. However, in case of an emergency, improvisation skills definitely help.