who is the wrong here ??

i was at a party with some of my friends last night and the first hour was kind of boring. we were kind of all sitting around and my best friend was barely talking to me so i was just sort of bored. eventually i decided to go upstairs with two other people to get drinks and i invited her to come with us but she said no. we ended up staying upstairs for a while and since my best friend was talking to a bunch of other people i figured she wouldn’t mind. she didn’t really seem that keen to talk to me that night but then again when other people are around, she never really is. so we came back downstairs like a half hour later and i went up to my best friend and she was all mad and said “why do you always have to ditch me for other people at parties?” and walked away to be by herself mean while i’m like.. you barely talked to me tonight and didn’t even want to come upstairs when i asked if you wanted to come with us and now YOU are mad at ME for not hanging out with you every fucking second. and then i’m the one who ended up apologizing and i feel really bad but there’s also a part of me that’s like, why should i feel bad? you know? like she was perfectly fine not talking to me and then when i leave for like half an hour she gets mad? she’s like clingy in the sense that i always need to be around her but she doesn’t really talk to me that much when i am if there are more interesting people to talk to. i’m not a fucking accessory, im a person. and she doesn’t get like this with any of her other friends. they can go off and do whatever but for some reason, the second i leave her side she gets mad. and honestly i know this sounds bad, but i was having a much better time at the party when she was ignoring me and i was just hanging out with other people. am i being a bad friend or is it fair to feel like she’s been a little controlling?