The story
From the Christian ritual, which was traditionally accompanied in Catholicism by a recitation of Psalm 25:6 (Psalm 26:6, in the Hebrew and in most modern translations) which in Latin begins with the word lavābō (“I will wash”). The sense of "room with a toilet" developed under the influence of lavatory and lav.
Etymology from Wiktionary, CC BY-SA 4.0.