They are not "optimized" strictly speaking. Thousands of CUDA cores on them don't do ray tracing, it is done on a separate hardware which just happens to sit on the same chip. Add RTX cores to Threadripper crystal and you will get the same result.
Well the comparison is between CPU and GPU. Will there come a point that an affordable CPU is faster than a GPU?
Maybe that time will come but I am not sure if that will happen soon.