While getting to explore (and get lost in) Barcelona for the first time, I noticed that there was a lot more diversity in the people than I had originally thought. I was surprised to learn that there are a lot of Chinese, Pakistanis, and Africans who've immigrated in the past decade. Additionally, because homosexuality is generally accepted in the city, it's not uncommon to see openly gay, lesbian, bisexual or transgender people being as affectionate with their partners on the street as straight people are (there's a lot of PDA here).
I think that this increase in diversity in Spain has contributed to the common usage of the question: De donde eres? As an African-American who's family is far-removed from our African roots, I'm mostly identified by locals as American, "la chica negra" (the black girl), or "la chica morena" (the brown girl). I've also randomly been mistaken for being French. My roommate, who's Vietnamese, has been called "chinita" (Chinese girl) countless times and has also been mistaken for being Filipino or Japanese.
The fact that the people here are so curious to find out where you're from is not that different from what I've experienced in the States. However, the approach is different. In the States people tiptoe around the question of race or ethnicity. People ask "Where are you from?" and when my reply, "California", doesn't satisfy, they ask "Where are your parents from?". Of course my next answer, "Ohio", doesn't help them any, either. So, as a last resort, they'll just say "Are you mixed with something?" In Spain, people get straight to the point and simply ask: "De donde eres?" or make a guess of their own instead of fishing for answers.
In one of my orientation sessions, the professor explained that describing people by their physical appearance is a social norm in Spain. So, terms like "la chica negra" and "chinita" aren't viewed as impolite or rude. When asked what Americans are viewed as by the locals, he jokingly said, "You walk around wearing flip flops with your short skirts or shorts and your Starbucks...You need Starbucks to survive. You wear the big North Face backpacks and fill them like you're going hiking in the mountains, but we all know you're not because you're wearing those flip flops!" On a more serious note, he warned that American women are often seen as being "easy" or "slutty" because young Americans often drink excessively when visiting because it's legal. And this paired with the short skirts can give off the wrong impression.
Nonethess, my experience with the Spaniards I've come in contact with has been extremely pleasant. Due to my tendency to get lost, one of my most used phrases has become "Donde esta (insert street name here)?" Everyone I've asked, whether they reply in English or Spanish has tried to help. And when someone does ask me, "De donde eres?" they are genuinely interested in knowing something about where I come from.