There is no doubt he has ulterior motives. However, if you saw him on the "news" networks he did make a valid point. There is absolutely no way a comprehensive border reform bill will pass the Senate if it does not also include funding for Ukraine. Similarly, there is absolutely no way funding for Ukraine will pass the House if there is not comprehensive border reform.
It's politics. You scratch my back and I'll scratch yours. It's only been that way since before Washington took office as President.