Reagan rightly realized that we had no vital national interest at stake in Lebanon, and left. Reagan's mistake wasn't in leaving Lebanon, it was going in in the first instance.
Ronald Wilson Reagan was a truly great President, as shown by the fact that the problems he was elected to solve (the Soviet threat, double-digit inflation) are so thoroughly solved that people barely remember them. It's a shame that we haven't had anyone even approaching his stature in the White House since then.
Reagan was nearly disabled by Iran-Contra. Trading arms with Iran for hostages. Perhaps you forgot that.
You blow off Lebanon as if it was nothing. bin Laden always cites the Marine barracks as the first example of America not having the stomach for a fight with terrorists. Clinton followed with Mogadishu and Khobar Towers.