JF-17 was designed for Pakistan's needs and a nearly absurd amount of modularity in mind. Which just so happens coincides with the needs of a lot of other countries other than China looking for affordable, easy to maintain jets. Its not a bad idea considering dollar for dollar, you'll have 3 flights of two JF-17 vs 1 flight of two F16 for the same cost. Also IIRC the plane was supposed to be called F-17 but they decided to honor the collaboration by calling it Joint Fighter 17 instead. China can simply afford to spend a lot of cash into more specialized, expensive planes in large enough numbers that it doesn't really need the JF-17.