It is not that Java or C# are able to beat C and C++ on micro-benchmarks, rather they are fast enough for most tasks that need to be implemented, while providing more productivity.
The few cases where raw performance down to the the byte level and ms matter are pretty niche.
The few cases where raw performance down to the the byte level and ms matter are pretty niche.