Why are bees black and yellow? I would say they mimic others, but I can think of no other black and yellow insect, and I guess this color wouldn't be useful in any habitat.

no one knows for sure but it is thought that the black and yellow stripes are to warn other animals (including humans) that they are dangerous. That is why people get alarmed when they see any flying insect with black and yellow stripes. The hover fly for example has black and yellow stripes. People are scared of them, even though they are completely harmless.

also note, not all bees and wasps are black.yellow they can be other colours as well.