1. Memorandum was an option to safe face. The giving up of nuclear weapons was an offer one cant refuse, neither US or Russia was interested in Ukraine having any, because the delivery devices were capable of hitting US and every other NATO country. If Ukraine declined then USSR might have decided to not give independence to soviet states.
2. Nuclear weapon is very expensive to maintain and requires advanced technology, Ukraine as a poor country could not afford that and did not have the required technology, since the rockets were not produced by Ukraine alone but whole USSR.
3. The launch codes were in Russia hands and it was virtually impossible to operate the rockets.
4. While rockets were stationed in Ukraine territory, it did not belong to it, the rockets were a product of whole USSR nuclear program.
Basically nuclear weapons were no use to Ukraine back then and nobody could predict, what will happen in the future, especially taking in mind the promise not to expand NATO border towards Russia. History could go other way, and Ukraine would be allied with Russia and possible target for NATO, US could not risk that, therefore the deal of giving up nuclear weapons was arranged, all the speculation of leaving weapon in Ukraine hands just hindsight.
One can speculate that already back then Ukraine was a potential target for US and memorandum was more targeted towards US and NATO then towards Russia, having the plans in mind US insisted on giving up nuclear weapons to Russia, the risk of leaving it in Ukraine hand was too big.