You are correct, but this is more interesting.
Finland giving up its non-aligned status automatically invalidates the 1944 treaty and recreates the state of war between Finland and Russia (as USSR successor state).
But even without this factor, the effect on Finnish economy would be very significant, for obvious reasons.
So Finnish rationale for this act is not clear.
The same as German rationale for their Ukrainian involvement - an idiotic crop of globalist politicians who have no idea what their national interests are.