But if you're on stage with "excellent" musicians, it does sound the same every time. The same notes in the same place. That's called Consistency. Yes you can take small walks within the structure, but those are small walks, more like pacing or meandering, actually, but you can't stray too far or you blow the performance of said song.
And yes, you can actually program machines to "wander", especially with drum sequencers that have "humanize" features like adjustable Swing/Feel.
Obviously you can't do that if all you've got is a CD in a karaoke machine and a guitar plugged into it. TwilightOdyssey did not suggest doing it with just a CD, but it was mentioned by someone else in a reply earlier (the other thread I think). There's a world of difference there.
With on-stage sequencers, you can take your hand off your guitar to tweak a running sequence during a song.
It takes skill, and practice, just like a crowd of warm bodies with instruments in their hands.
With a multi-track recorder or sequencing unit running out to a mixer, you can set up alternative patterns and fills in a given sequence and swap them on the fly with the channel mutes to keep it from being "the exact same thing all the time".
Or you can leave the backing tracks alone and make the primary focus the current solo/melody-carrying instrument.