Shadal on Bereishit 2:4 points out that the Tetragrammaton was originally read as written. (Later in the piece he goes on to attempt to reconstruct the original vowels.)
However, sometime during the Second Temple period, it was enacted not to read it as written, instead replacing it with the name of Adnut (Ad-noy).
He notes further that:
שלא ניקדו אותו על דרך אחת בכל מקום, אלא לפעמים ניקדוהו בניקוד אלהים, וזה כשלפניו או לאחריו שם אדנות (אדני ה' או ה' אדני), והיה טעמם כדי שלא לכפול שם אחד בעצמו שתי פעמים רצופות בקריאה במקום שלא נכפל בכתוב
[The Masoretes] did not vowelize [the Tetragrammaton] in the same way in all places; rather, sometimes they vowelized it with the vowels of Elokim, in cases where it is preceded or followed by the name of Adnut (Ad-noy YKVK or YKVK Ad-noy). Their reason for doing so was so as not to double a Name, reading it twice, consecutively, in a place where it was not written doubled.