for ... glory of thy name [and for] thy name’s sake - both mean for illustrating Thy attributes, faithfulness, power, etc.
purge ... sins - literally, “provide atonement for us.” Deliverance from sin and suffering, for their good and God’s glory, often distinguish the prayers of Old Testament saints (compare Eph 1:7).