I don't know if it's true, but I've always been told that, like car dealerships, most of the profit in a bike store comes from repairs and not sales. There are certain sorts of bread and butter repairs
where the make of the bike doesn't matter much, though, obviously, changing a tire on a hub drive e-bike probably does require more labor. There are certain repairs that may be very parts dependent, something that might explain a shop only being willing to work on brands they sell. There are also shops that won't work on what they consider to be cheapo bikes (think the bottom of the line Huffys), simply because there's not much point in say spending $75 on a bike that's worth less than that and likely to break down in some other way.
When I had a BMW e-bike (the dealership sold me the bike, but clearly had no idea how to work on it), I found that shops were happy to work on the "bike" parts, just not the e-parts.