What they were hoping for is that you would crack and spill all the beans, then use you to get the gal.
Thank goodness you didn't crack, but you also lied to them which is very risky.
Also thank goodness they didn't hit you with the "We have a statement from the gal already incriminating you, so if you'll just confirm that we'll let you go; she's the one we wanted anyways." That's the oldest trick in the book, but it's amazing how effective it is. It's all BS of course, LE can lie all they want, and legally too.
The proper answer to the question: "Why do you have all this money on you?" is: "I would prefer not to answer any questions officer. Am I being detained?"
You're lucky they didn't just pocket your money and claim it is for evidence pending charges, or some shit like that.