I think the causation is at least partially the other way around - people you choose to spend time with reflect who you are.
When you try to game the correlation by forming friendships aspirationally, this largely breaks down. It's much more important to come to terms with who you are than to try to become more like someone else. When you're trying to be X, you're not X, you're just someone who's trying to be X.