The impression I got, from attending a school with a lot of diplomat kids, is that a lot of countries have embassies as a sort of foreign holiday for their ruling classes. Now NK being a bit antagonistic and paranoid might be an exception, but I distinctly got the impression that there were a lot of countries that didn't really do a lot of diplomatic work with the host countries, but the embassy meant they could send some families to go live in the west and have their school paid for by the state.
Those kinds of embassies don't need to be in the fancy embassy district.
The NSA stays at home. There are some diplomatic normal folks to do the consularic work (visa, lost passports), the rest is secret service (recruiting agents, influencing the press, police, "diplomatic" ie secret communication, contacts to other embassies and the host).
And if it's a cross border offensive it's more likely to be Air Force Space Command (since, you know, cyberspace is right above regular space which is just a little higher than airspace :p)
(its just that electronic warfare is a natural extension of long range, lets call it, interference)
The embassies are not my ballgame but I get the impression they are not there because a lot of diplomacy needs to be done all the time - but to already exist when the need for diplomacy arises.
Open channels of communication and all that.
An alternate explanation to your point is that countries would like to have the appearance of being as shadowy and influential as what the CIA has going on. I'll quote (AFKA) mos def [0] and also link to the 99% invisible episode in number stations [1]. Some countries broadcast codes nonstop A in case they ever need to, no one can tell they just started and B to have the appearance they have covert agents behind enemy lines, just to be spooky.
Mentioned that he worked for the embassy
People seem to find that interesting
High status, intrigue and mystery
Special code name on the hotel registry
I love it when they say
"Enjoy your stay"
They say it how they mean it
'Cause that's the way they been trained
Show you to your room
A suite with a view
When, if anything at all
Do not hesitate to call
...
Salutations, congratulations
Reservations, exclusive arrangements
Dinner with the patrons, the scenery is amazing
It's so outrageous, they whisper when they say it
When it's really real it's even realer than "The Matrix"
Classic, modern, ancient, flagrant
Get a special thrill every time they get to say it
Peace! I work with the embassy
On behalf of imagination industry
I come visit, you come visit
Such a pleasure, official business
La, la, la, la...
(Boogey, boogey, man, man)
Those kinds of embassies don't need to be in the fancy embassy district.