Proximity to Ukraine has nothing to do with it, if anything Krakow is closer, or at least a more direct route to get to from Ukraine than Warsaw.
It has more to do with the larger Krakow region, the area and the town are more scenic than the Warsaw area, some due to nature, some due to WW2 and Cold War urban architecture.
I am sure some of it is the "Rick Steves Effect", people on here read his books, take his tours. He talks up Krakow and the area a bit more, it is included on a couple tours, whereas Warsaw only one. However, most guides and info on Poland talk about the same three regions, (Krakow, Warsaw, and Gdansk/Pomerania) with the Krakow area and the South getting more attention.