Arecibo did receive military funding, but that was because the military was interested in the behavior of the ionosphere. It was always a general science and technology development platform.
Soviet tech allowed members, and equipment, to cross the borders of the country. ;)
Further, Arecibo works at frequencies of 10-40 MHz, substantially lower than even the lowest frequency radars. With secondary reflections you might be able to detect that a radar pulse had been detected, but determining where it came from or even what emitted it would be extremely challenging.
I suppose perhaps Cuba could have been spied upon with it, but again it's just the worst design for the application.
EEEeeee.. don't confuse the weird biases in scientific research from publication incentives as being a true metric of scientific utility.
There is a tremendous bias in favor of "new" instruments because the low hanging discoveries made possible on something new (not even necessarily 'better' just different) haven't been made yet. But much of that research is extremely superficial and doesn't go on to contribute much to the forward body of knowledge -- it just helps churn out papers to support career progression.
Arecibo was thoroughly unmatched in several respects, particular as a radar[1]. It was also the premier instrument for validating observations made on synthetic aperture instruments since as a single aperture it's largely free of the artifacts that synthetic aperture instruments. Validation is scientifically critical but also doesn't tend to produce a lot of high profile papers.
[1] E.g. consider these images of the moon imaged using Arecibo as the transmitter and Green Bank Telescope as the receiver https://sservi.nasa.gov/wp-content/uploads/2014/05/craters2l...