The I5 does not win only marginally. Even the 2500k still fights head on the 8350 and usually wins. Imagine what the 4670k would do.
http://www.bit-tech.net/hardware/2012/11/06/amd-fx-8350-review/6
http://techreport.com/review/23750/amd-fx-8350-processor-reviewed/14
http://www.tomshardware.com/reviews/fx-8350-core-i7-3770k-gaming-bottleneck,3407-9.html
What people mostly notice is numbers of cores and numbers of threads and "when games start using X number of cores", but that is the smallest part of the picture. It is not only the CPU you should look at, it is the whole platform. Intel has superior performance when considering RAM and PCIe performance. Not to mention that a game can use 6 or 8 threads, but only 2 or 4 of them are heavy. The other ones are light. They are usually sub-threads. In the best possible scaling scenario, such as 3D rendering, the 8 cores of the FX 8350 go only 20% on top of the I5 in the best case scenario. But you will not see that kind of scaling in video games in the near 5-10 years.
http://www.tomshardware.com/reviews/fx-8350-vishera-review,3328-8.html
In the Photoshop test, without OpenCL acceleration (using GPU) the FX 8350 arrives first. But once OpenCL is turned on, it falls behind even the I5s. This is what a gaming scenario look like. A game does not use only CPU, it needs the synergy between the CPU and video card.
Before someone starts criticizing me for my logic - productivity software tests out the real power of a PC component in way more solid way. And if those 8 cores lose to 4 cores even in productivity - then there is no way they can beat in gaming. Hope this was helpful. Cheers and good luck.