The Role Was Written Before She Was Born
The joint family doesn't assign the villain role after she leaves. It assigns it the moment she starts wanting something the house didn't budget for, a different city, a career that requires actual time, a marriage she chose herself, or simply a door she can close. The leaving is just when the casting becomes official.