I completed all the missions of Grand Theft Auto: Vice City many times,but I am confused that Why Tommy Vercetti killed all the people including Lance Vance at the end. Why did this happen? Can anyone enlighten me?
Because Vance betrayed Tommy to Sonny Forelli (his former boss).
Vance felt sidelined/disillusioned after he and Tommy overthrew Ricardo Diaz. Tommy regularly treated Lance poorly, and shortly before Sonny Forelli's arrival Tommy claimed the Vercetti business was his alone, which Vance thought he was in partnership with:
"Sorry Tommy. This is Vice City. This is business."
- Lance betraying Tommy
So, Lance betrayed him. He revealed to Sonny Forelli that the cash payment Tommy was making was counterfeit. This prompted Sonny to come prepared - bringing a large number of gunmen to the Vercetti Estate (the scene of the final mission).
Tommy therefore killed Vance for the betrayal, and the 'other people' he killed were the henchmen of Sonny Forelli, as well as Sonny himself, who (rightfully) considered Tommy a traitor for the counterfeit money.
Much of this is explained in far greater detail on the GTA Wiki. You can read about Lance Vance and his motives there.