USB is not a peer-to-peer system like 5-pin MIDI. There are host or "master" devices (most often, computers of some sort), and peripheral or "slave" devices. Your keyboards can't connect to each other directly, but must be connected via a host.
In the early days of USB, it was simple... the USB-A connector was on the host and the USB-B connector was on the peripheral devices. And they didn't make the two connectors different to make things difficult... they did it to prevent people from doing things like you're trying to do, things that couldn't possibly work. Something with an A connector could connect only to something with a B connector, and vice versa. Things later got more complicated with USB OTG and USB-C, since something with a given connector could function as either host or slave device, but A and B remain pretty straightforward. The only way you can connect those two keyboards together is through a host device... e.g. computer, tablet, smartphone, or standalone host like
this one.
There are a handful of keyboards that include USB host functions, so that you can indeed plug another USB controller into them, but even then, they would supply USB-A connectors for that purpose. You'll find that functionality on MODX/Montage, Kronos/Nautilus, and Kurzweil PC4/K2700, for example. (Your DGX-670 does have a USB-A connection on it as well, but as the manual says, its use is limited to flash drives and their wireless adapter.)
As for why a B-to-B cable exists... apparently there are some "non-standard" uses. I looked up one on Amazon, and the description said "The cable is good for those rare applications where Type-B connection on both end is needed. Like Automotive Sync Cable Replacement."