The biggest condition behind US aid to Jordan and Egypt is them continuing friendly relations with Israel. In 1970s when this aid was started- this condition was made very explicit by USA.
So in other words, these two at least are nothing but indirect aid to Israel.
You could ask the same questions about that yes, but whataboutism does not answer the questions here.
For Ethiopia it's flagged as humanitarian aid, and likely for Jordan as a result of the neighbouring Syria war.
None of that is arms though, and critically more than the aid, why the legislation?
What justifies making it illegal to stop investing in a country despite it's actions? Surely that's a commercial decision rather than a legislative one?
We gave Pakistan and Iran a few billion dollars in military aid a while back. What we got in return was a Bangladesh genocide and an Islamic revolution.
Lesson learned: arms sales can be used to ideologically justify butchering civilians if the government receiving that aid is not held accountable.