Or if they are in a hurry. Seen it many times, even nearly done it myself once or twice (you know, you're on one side of the street, your bus/tram is just pulling up on the other, and you're already late...). Engine sound is useful, the funny electric whine an electric engine makes might not be enough. While I haven't heard of accidents caused by electric buses my city recently bought (they're still audible, especially on the outside), a smaller engine would be almost inaudible over ambient noise.
Also, at least in the decrepit jalopies my family tends to drive, engine noise is an important diagnostic tool. If it starts sounding funny, then you better stop and take a look (that said, should any modern car survive long enough to become such a jalopy, the "noise enhancer" would likely be long gone). Not to mention switching gears is done by ear by most, in case of a manual transmission. I usually try to keep them quiet, though there's something in the high-pitched roar of the turbo firing up.