When the effort is no longer profitable...
That's not what happened.Sounds like excuses to me. I don't care, Ukraine shouldn't have been poking a notoriously edgy and vicious bear like Russia with a short stick.
Ukraine found gas/oil reserves in 2012 that would have allowed it to undercut Russian sales to Europe, and began making noises about joining the EU.
Then Maidan and MH17 happened, and Putin's showed he would not let Ukraine's citizens decide their own fates, if they went outside Moscow's sphere of influence.
Ukraine's existence an independent state is 'poking the Bear with a short stick' as far as Putin/Moscow is concerned, and it just show how much Russian propaganda has permeated through a segment of the US/western populace.
Also, did you forget the Ukrainians still remember Chernobyl and the Holomodor; the Ukrainians know what Moscow will do to them if they let Moscow keep or take power over them again.