What you did wrong? You didn't ignore that bullshit and hand her your phone. You backed down the moment she put up a little resistance, and that's weak sauce. On the positive side, you won't make that mistake again will ya?
Girls do stuff like that all the time, they say they don't give their numbers out to random guys or they ask you to give them yours instead and so on. It means she likes you, but she's testing to see if you have some balls, that's all. If you freeze up or say ok and do what you believe she wants you to do, it's game over cos she sees that you're willing to back down and let her have her way (or in the case that you freeze up, she sees that you don't have any balls and don't know how to handle her). There are plenty of girls who like guys they can push around, but I can tell ya 99% of the time it's definately not in a sexual way lol.
Now, a lot of guys think "if I say yeah right and tell her I want her number again she'll think I'm pushy and I won't get her!" - no, it's called having balls and not taking shit. And this is what she really wants to see from you. You're thinking too much about what she's thinking and what she wants, and how to make a good impression. That's why you froze up and didn't brush it off, cos you were trying to think about the best way to act rather than just acting on instinct and doing what you wanted. But now you know!
Stand up for yourself and do what you want - not what you think she wants. I just laugh and say "yeah right, here ya go" and hand my phone over. Most of the time she will give in right away, sometimes she will continue to test you... same thing again, just stick to your guns and tease her a little if you feel like it. Once you see this pattern for yourself a couple of times you'll realise they don't mean what they say at all.