"Fit" is such a vague concept to nail down. Maybe the other candidate just "clicked" better with the decision maker.
When I was last looking for a job (12+ years ago) I worked with a recruiter and went on interview after interview after interview. There were some positions where I went back for as many as four interviews, took proficiency tests, etc. I didn't always get a clear answer as to why I was not chosen for various positions. Some feedback included things like "too nice," "too smart" and "over qualified." I really don't think that any 24 year old can be over qualified for anything but OK...
What I do know is that for every interview, I presented the best version of me, but I was "me." I am nice...and smart, polished and prepared. The right company valued those qualities. The right decision-makers liked what they saw and knew that what I would bring to the job was what they needed. There was another position that I thought I really wanted and in hindsight I was very glad that they passed me over. It was a very cutthroat field and they did need someone who had more of a tough edge than I have. Anyway...I have been with my company for almost 13 years. I've had 3 promotions and have survived 7 lay-offs. I got hired based on how I really am and it's served me well.
So...continue to be true to yourself. Always put for the best version of yourself, but trust that the right employer will come along. It's tough to keep the faith in this economy but unless you get this same kind of feedback over and over, I would just assume that it was more about the hiring manager and the other candidate clicking and not something that you should do differently.
I would recommend always wearing a suit to the first interview. For the second though, if the rest of the office is casual and everyone else is in jeans or really casual business wear, I would consider dressing down a bit for the second interview - perhaps a skirt or dress pants with a blouse or twin set but no jacket.