That's not generally how lobotomies work. They're not great, but they don't cause generalized cognitive impairment. They cause severe executive dysfunction, while leaving other cognitive functions unaffected. Although I suppose any surgical procedure can go wrong - she may have suffered a brain bleed, for example, which destroyed tissue they weren't intending to affect.
Also, she probably wasn't average intelligence beforehand. She seems to have had generalized delayed milestones as a child, and was generally considered to have a low IQ. It's also unclear whether she showed any signs of autism, or just cognitive disability.
She showed worrying changes prior to her lobotomy. She'd started having seizures, and was having mood swings and violent episodes. There's some evidence that seizures can sometimes lead to mental decline, so that could be an alternate explanation for her poor functioning after the lobotomy.
In any case, it doesn't sound like her family was ashamed of her being disabled, although her erratic behavior made her father worried about scandal. He also hid from his wife the plan for her lobotomy. (I have to wonder what she thought of that!) He certainly wasn't trying to cure her developmental disability - he was trying to stop her mood swings and violent behavior.
It's important to keep in mind that lobotomies weren't intended to be cruel. At the time, they knew very little about how to treat people with mental illnesses or neurodevelopmental disorders, and a lobotomy can sometimes help someone with mood problems. (We now know this is because of reduced self-awareness after the lobotomy, resulting in patients being less self-conscious and less likely to experience low self-esteem or worry about what others think of them.) I have no doubt that most of the doctors who practiced lobotomies had good intentions, and family members trusted the doctors judgement. I sometimes wonder what medical treatments we're doing now will be seen as barbaric in the future, just like lobotomies.