Social factors mentioned there can make a big difference. I've seen plenty of C code choose safety over efficiency.
Our team writes a lot of C++ code for high-level stuff you'd normally do in say JS or Python. At the rate we make changes, we can't write very tight code. Strings and other structs end up getting copied needlessly due to ownership, like if something takes vector<string>& and internally copies those strings into a map, we don't bother also making an external-owned version taking vector<string*>&. Or less efficient algorithms are used due to ease of safe implementation. Or there are fewer or less optimized libs available. Or it's a webserver and we have to throw threads at it instead of event loops.
The end result is C++ code that's slower than the equivalent Python code, dev time being equal.