Leaving aside the fact that Ukraine is a sovereign country whose independence is recognised by Russia, and it has the right to join whatever alliances it likes, back in 2014 Ukraine was not interested in joining NATO. It was merely interested in economic cooperation with EU - if you don't understand why, once again just look at the GDP per capita chart.
Did it hurt Russia? Quite the opposite, as economic growth in Ukraine would only increase its trade with Russia.