Jennifer Lopez and Ben Affleck's marriage was instrumental in helping him reconnect with his family-oriented side, a source tells PEOPLE . Despite Lopez filing for divorce from Affleck this week—marking the second anniversary of their Georgia wedding—their relationship was deeply rooted in family values. "Family was a top priority for both of them," the source explains.

"Together, they were very much focused on being a family, and that connection doesn’t simply vanish." Lopez, who shares 16-year-old twins Max and Emme with ex-husband Marc Anthony, and Affleck, who has three children—Violet, Seraphina, and Samuel—with ex-wife Jennifer Garner, both placed significant emphasis on their blended family life. The source also highlighted their differing personalities: "Jennifer is very public and enjoys going out, while Ben is more of an introvert who prefers staying in.

" Despite their differences, their shared commitment to family was a central theme in their relationship. They were spotted together in Los Angeles on Tuesday, just hours after Lopez filed for divorce. The ex-couple had been in New Haven, Connecticut, to drop off their daughter Violet at Yale University.

Affleck and Garner, who have reportedly maintained a positive co-parenting relationship, were seen leaving the airport together in a car, indicating their continued collaboration for the sake of their children. The actress has been dating California businessman John Miller on and off since her split from Af.