The use of "peace" as an interjection has its roots in the peace movements of the 1960s and 1970s, particularly during the Vietnam War era. It reflects a desire for harmony, nonviolence, and tranquility.
The context of using "peace" as an interjection is typically informal and friendly. It's often used among friends, peers, or acquaintances as a way to bid farewell or express a wish for well-being.