It used to be called a rabble.
Then some Latin scholar of the seventeenth century recalled that the Latin phrase for a “fickle rabble” was mobile vulgus.
This was picked up by others who shortened it to the one word, mobile (pronounced “mobilly” at that time).
But even this was too long, and before the end of the century, much to the disgust of the purists of the period, it had been further shortened to mob.