That's one of the things Monkey Island 2 did. It also had the track seamlessly changing cues and adding/removing layers as you entered various sections of a location, had multiple transitions between the same tracks that were chosen depending on when did you trigger them and in-game events were often timed to wait for the beat to synchronize them with music. Later games with similarly dynamic sampled music that I'm aware about (The Curse of Monkey Island, MI2:SE, Portal 2 and now Octopath Traveler) did some of these things, but none of them came close to the level of complexity in the original Monkey Island 2.
Although one reason for that (other than the obvious MIDI vs. sampled one) could be that in MI2, a lot of effort went into this music system which ended up working great, but... not many people actually noticed ;)