In the book The Big Bang Theory: The Definitive, Inside Story of the Epic Hit Series, writer Steve Molaro said, “We, in the writers room, were into [Sheldon and Amy’s blossoming relationship], but we didn’t know where it was going to go. We didn’t know they were to have a second date, or how that was going to play out and keep evolving through the years. But we went into it like we do with all additions to the show and all the characters: We’re hopeful and trying to do our best to make it grow into something better and interesting; that was one of those that obviously did. But it took a little while to shake off the ‘female Sheldon’ description and let her become her own person.”

Jim added, “At some point in Season 4 — I don’t know if something caused it or not — I remember saying to Todd [Spiewak, his huband], ‘I will not let this character go without a fight.’ That was notable for me, only in that I almost never disagreed with the writers. But at some point I felt a certain way about working with Mayim that I was like, ‘If for whatever reason we seemed to be weaning her off of this show as a character, I would go and talk to them.'” 

Source: https://www.buzzfeed.com/kristenharris1/tv-love-interests-saved-by-chemistry