This is a common questions among students of Italian and the explanation is very easy: in all three cases the “d” is added when the word that follows starts with the same vowel so adding this little letter makes sure that we are able to read the word and the following one together, without having to pause.
This “d” is indeed called “euphonic” from the Greek word for harmony.
Example:
1) Io ed Emilio giochiamo.
Would you be able to read out loud “Io e Emilio giochiamo”? You wouldn’t, unless you stop for a second between the first “e” and the second one to separate the words.
The same applies to the second and third expressions below:
2) Vado ad Ancona vs. Vado a Ancona;
3) Vorrei vivere a Bari od Otranto vs. Vorrei vivere a Bari o Otranto.
What happens when the word that follows does not start with the same vowel, as in:
4) Io ed Andrea giochiamo vs. Io e Andrea giochiamo;
5) Vado ad Edimburgo vs. Vado ad Edimburgo;
6) Vorrei vivere a Bari od Ancona vs. Vorrei vivere a Bari o Ancora.
In these cases the “d” can be added, but it is a stylistic choice and not the rule.
It is also recommended not to add the “d” if the second or third letter of the following word would be a “d” again, as in “ed educato”: in a case like this, “e educato” would be preferrable.