Actually I've never noticed this technique in classical music, although there is something called a Coda, which is a sort of short recap, or punctuation at the end. But for jazz and pop music, these riffs as you call them are sometimes called a vamp, or just repeat and fade, if this is the case. One example that comes to mind is "King of Pain" by the Police.