After passing security, is it legal to give your boarding pass to someone else?
No. It is not legal to give your boarding pass to someone else. It is a non-transferrable document.
This is why your boarding pass is checked against your ID at security checkpoints. Your boarding pass indicates the level of security screening you face, which is particular to the individual identified on it. It is also used to make sure that the person identified in a boarding pass and their luggage are on the same flight (also called "positive passenger-bag matching"), to discourage non-suicidal terrorists from inserting bombs onto planes. This is authorized by 49 U.S. Code § 44901 and by related regulations.
An airline would be within its rights to insist on ID to confirm the identity of someone holding a boarding pass before boarding and after the security checkpoint, even though this is not common practice to do so on domestic flights (it is common to do so on international flights to facilitate bag matching and to prevent the airline from having to return someone who doesn't have a passport to their point of origin).