My dd1 has always had a tendency to latch onto one friend, who then becomes truly important. She's only recently (past 2 years, maybe?) become less intense about this (she's now 6, and when 3 & 4 this was much more an issue).
At preschool, they'd have times they'd encourage her and her friend to do different activities and separate them. While this was (mildly) devastating to my dd, It made a lot of sense - they were gentle about it - and it probably ended up helping the most in the long run since it's mainly been friends at school whom we didn't see a ton otherwise (except occasionally).
I'd often talk about solo-activities I knew my dd liked at school, or other friends at school she'd enjoyed doing things with in the past in an effort to make it less fearful/devastating to sometimes do things with other friends or end up being separated from her one important friend. And because in her focus on this friend, she'd often forget about things she truly enjoyed that this person didn't. That was never something I liked - stuff like liking this or that princess (who we had no personal experience with) BUT I tried my best to ignore that and it would eventually blow over and she'd like what she liked for her own reasons eventually.
In my dd's case, it always felt very personality-driven. I think she'll always have a tendency to have a super-special friend she's focused on a lot.