I agree with others' posts. I travel between Peru and the US about twice a year with my Peruvian-born daughter who has dual citizenship. I always have to present her Peruvian passport upon leaving immigrations in Lima. Then I show the US passport when entering the US. I basically keep this rule in mind: "Present the passport for whatever country you are in." It's interesting because she has an uneven number of entry and exit stamps in both of her passports. Perhaps they don't care too much because she is a child.
Nonetheless, the first time I left the country with her was a nightmare. Since I travelled without my husband I had to have a special, notarized letter saying he approved the trip. However, when I got to customs I learned that my letter was in the wrong format (not on notary letterhead - would have been nice if the notary let me know that before stamping the pre-printed letter I presented). As my Spanish was not so strong, I ended up crying and told them (in English!) that I have to leave the country that night. The customs agent had pity on me and sent me to her supervisor who said I could leave if I paid a "fine" for the wrong letter (which ended up being $30, all I had in my wallet after paying the exit tax at the airport). I hate to suggest paying a bribe, but it worked for me. Of course you can never rely on this and $2000 dollars is a lot to lose for these kinds of issues. Seems like you could try again and just show the Peruvian passport on your way out. Next time you should consider using your US passport to come back in the country though.
By the way, I was also harrassed in Houston the first time I entered the US with my daughter. They asked the exact questions you suggested: "When was the last time you were here? Where have you been? Why were you gone so long?" I got a dirty look and I swear he wanted to search me, but my daughter was crying so he let me go. I guess crying, on my end or my daughter's, has been critical in these situations!