Sounds like the police in that area are more interested in getting drugs off the street than getting people who roll past the stop bar off of the street. That's a pretty common police tactic... to use a very minor traffic infraction to question people coming from an area that may be known as a "high drug area" or a "known drug house."
Luckily for you and your boyfriend everything was clean. Unfortunately, if you really did roll past the bar, the police are authorized to give you that ticket... as stupid as it seems. You should go to court and/or get an attorney to get you a "withhold of adjudication" so you don't have the conviction and/or points on your driving record.
Mr. Slavin is correct, but I would argue the ticket should be dismissed because the cops took too long in issuing it. I wouldn't admit you went past the stop bar (how do you know you did) and call the cop a liar. I would definitely make the cop come to court for the ticket. Drug cops hate that.
Next time this happens, if ever, politely asked why you were stopped. Make them tell you. Politely offer your license, registration and insurance card. Refuse to answer any questions except about the reason for the ticket. If they don't start working on the ticket pretty quick, ask for your license and registration back and tell them if they are not writing a ticket you are leaving. DO NOT LET THEM SEARCH THE CAR OR YOUR PERSON OR YOUR POSSESSIONS, if they ask you if they can. Cooperate, but only to the extent you are required to. Don't volunteer anything and make no admissions.
Good luck in court.