The reason U.S. embassies sponsor cultural and educational activities is to foster professional, academic and cultural relationships between the country and the U.S. in a way both countries get to learn and be enriched by the exchange, but they are mainly done to let the country know about the US culture and way of life. This exchange helps grow closer bonds between both countries and their cultures.
I also believe that these activities aim to having a multiplying effect by letting know the U.S. culture to the country. This will foster the liason between the US and the citizens of country where the embassy is located.
These cultural and educational iniatives are usually conducted by the Cultural Affairs Section of the embassy.