The one time I had the issue was after using the phone and turning off the Bluetooth so my wife you talk on it without it piping through the car. After the call it played the music through the phone vs the car.
Current: '13 E92 M3 Euro Delivery 9/4
Wife's: E39 M5, E36 M3, E30 M3
Gone: E86 M Coupe