As far as I'm aware it is always illegal.
My brother worked in a record store for years and they would never stock an unofficial release. Obviously some did.....in order to make money and probably presuming record labels and bands wouldn't patrol every record store on earth in order to catch out the rare instances of a bootleg being sold.
I do know artists would go to Notting Hill markets in London and confiscate cassette bootlegs in the 70's and 80's.
A recording is a permanent record. So as an artist you don't want to release recordings from a gig where your guitar was out of tune for a couple of songs, or you had a nightmare show because the monitoring was bad....etc...etc.....
Before the iPhone, concerts were fleeting affairs. Any mistake or tech issues came and went in the blink if an eye.A Dire Straits bootleg is like a novel that hasn't quite been finished, with grammatical errors and spelling mistakes, or a rough cut of a movie that is 2.5 hours long instead of 1.5 hours. That goes for every artist.
Of course, completist fans love to hear the 'work in progress', but it's no surprise that music artists (and novelists and film makers) don't want anyone to see or hear their creative product until it is FINISHED.