The MacBook 2015 has a magnet in it that detects when the lid closes and puts it to sleep.
I often walk around with both my MacBook and bluetooth speaker in hand these days, and often inadvertently the magnet in the speaker triggers the MacBook to sleep.
How can I prevent that?