Because they work very well with horses and before the invention of engines, fire engines were powered by horses. The dalmations would snap at the heels of the horses to make them run faster. Horses obviously aren’t used to draw fire engines anymore, but the dogs were kept on as mascots.
The bigger question is, what were fire engines called before engines had been invented? Fire… horses? That would be amazing.