Your function takes a map by value (forcing a copy of every single string unless you used std::move) and returns it by value, forcing another copy (and RVO doesn't apply because a function argument cannot be RVO'd.
Pass by reference.
Also, the body of your function is full of redundancies: it's exactly equivalent to simply this:
You should pass a reference of the map to the function instead. When you pass a map to parameter one of 'insert', it creates a duplicate of the map for the function to use. This isn't a problem with small amounts, but when you get towards 750,000 entries... You can see how creating a duplicate of a container all 750,000 times you call the function could drastically reduce performance
for a large number of small strings, unordered_map is indeed the better choice. E.g. on my computer, reading a file with 250k words into a unordered_map<string, int> using that function (in the variant I posted) takes 0.15 seconds, while reading into a map<string, int> takes 0.22 seconds.
(but of course, there are specialized data structures for strings that should perform better, if insertion remains a bottleneck)