It's a mystery, but the contradiction is noted in D&D canon.
Beholders were originally chaotic in the Greyhawk supplement (1975), but many creature alignments changed when AD&D introduced the two-axis system in 1977. They are lawful evil in the 1st edition Monster Manual, the 2nd edition Monstrous Compendium Volume 1, the D&D 3.0 and 3.5 Monster Manual, and the 5e Monster Manual. In short, they've practically always been lawful evil.
However, in the Basic D&D product line, which never adopted the two-axis alignment system, they remained chaotic. For example, they appear as chaotic in the D&D Companion Rules (1984). This provides one possible influence.
The earliest reference I can find to the Beholder deity Great Mother is Monster Mythology (1992), p. 70, where she is described as chaotic evil, and her worshipers are chaotic evil beholders. This is almost certainly an error introduced by the book's author Carl Sargent, as beholders were already lawful evil at this point.
However, the Great Mother's alignment has never been corrected or changed in D&D canon. Her chaotic evil alignment and her home in the abyss are described in Planescape Campaign Setting (1994) and Planes of Chaos. The Planewalker's Handbook (1996), p. 14, even repeats the incorrect assumption that beholders must be chaotic:
It's also home to a number of powers, particularly those worshiped by chaotic monsters like bugbears, beholders, lizard men, and drow elves.
I, Tyrant (1996), finally notes the contradiction, in a quote attributed to a character named Ronassic of Sigil on page 21:
The beholders' devotion to their deities presents the most fascinating irony in all of beholder scholarship. If my research is correct, these creatures worship beings whose very natures radically challenge the beholder species' self understanding. This fundamental difference between worshipper and deity may account for a large portion of beholder behavior.
The same page notes, without making oblique statement on alignment, that the Great Mother, unlike actual beholders, is "totally devoid of any logic". Most beholders appear unaware of the fact that their deity is utterly chaotic, and those that discover it begin to go insane. The beholders assume that the Great Mother knows all knowledge, but she mostly ignores her followers, and only communicates by incoherent babbling.
I, Tyrant goes on to say that the Great Mother and Gzemnid are chaotic evil, but retcons that their beholder followers need not be, which explains away the inconsistency introduced by Monster Mythology.
D&D 3rd edition's Lords of Madness describes that Great Mother is not a true deity, but an ancient, ageless entity of deity-level power. Various such entities exist in D&D lore, including possibly the Great Old Ones and Sigil's Lady of Pain. This would mean that she isn't reliant on the worship of beholders for her power or survival, and this perhaps concurs with the claim in Lords of Madness that beholders almost never become clerics, although they do live in devotion to that entity, with each beholder arrogantly believing that they are the true ideal representation of her creation.
In short, the real-world reason for the beholders having an opposing alignment to their deity is not well defined, and very plausibly an error which established itself in lore. The lore reason is a little better defined, and it is that beholders are so insane, arrogant, have so little contact with their deity that most are ignorant of her true alignment.