Shakespeare was not only a playwright but a director, producer, actor, and co-owner of the theater. His production of Julius Caesar required a mob of extras to play the plebians who are turned into a rampaging mob by Mark Antony's great funeral oration. No doubt, Shakespeare decided to get additional use out of these extras rather than having them sitting around during the performance doing nothing and getting in everybody's way. He uses some of these extras in the very first scene of the play, when they are playing working men taking a holiday and are confronted by the two tribunes, Flavius and Marullus. It can be seen that only one of this group of men has a speaking part in Act I, Scene 1. That is the actor who plays the Cobbler, who is undoubtedly a professional actor and a member of Shakespeare's company. Shakespeare gets additional use from the extras by inserting a scene in which the rampaging mob confronts Cinna the poet and tears him to pieces because he has the same name as one of the conspirators. The anecdote about Cinna is contained in Plutarch's Life of Julius Caesar. It includes this sentence:
For there was among the conspirators man who bore this same name of Cinna, and assuming this man was he, the crowd rushed upon him and tore him in pieces among them.
Shakespeare utilizes the incident to demonstrate the fury of the Roman mob and to create a strong impression on his audience. According to Plutarch (but not to Shakespeare) it was this incident involving the innocent Cinna that made Brutus and Cassius decide to flee the city.
No doubt some of the extras who appeared in the three scenes mentioned above would also represent soldiers on both sides at the Battle of Philippi in Act V.