Lepidus became one of the triumvirs partly because he had a large number of soldiers under his command and also because Antony needed him. He served to balance the power of Antony and young Octavius Caesar, because he was a threat to neither Octavius nor Antony.
Lepidus is the eldest of the three men, and he is, perhaps, the least ambitious. It is possible for that very reason that Antony and Octavius are able to dominate him and make his position in the Triumvirate largely that of a figurehead.
The real Lepidus undoubtedly was not the buffoon which he appears to be in this play, but his lack of actual power is fairly accurate. He serves as both a foil and a mediator for the more powerful triumvirs, who are rivals for the ultimate prize of the Roman Empire.