Intel's had premium chips, hence the premium pricetag. The initial price of the fx 9590 was laughable due to performance, amd isn't in the business of being the discount bin cpu. They have had little choice though other than to price their cpus in accordance with performance. An i5 would require a new motherboard, ddr4 ram would be preferable (most skylake/kabylake boards and amd's ryzen am4 platform moving forward are all ddr4). Also a reinstall of windows which may or may not mean buying a new copy depending if the current version is oem or full retail.
If the prices are similar I'd consider the 6500 over the 6400. Usually the price isn't much different and the 6500 is 300mhz faster. The i3 is still a good performer but depending on the game it may suffer a bit from only having two cores. Hyperthreading helps but in games like witcher 3, bf1 etc it's going to result in more fps drops and lower min fps.