Yeah indeed, it happend to me also already several times.
I always copy the javasource/Modulname/actions/Javacodename to the new location. Then you do have the code in the new model. But I agree with you that it would make common sense to put it in the .mpk
Very curious why the java code does not gets exported as a standard. May be somebody from Mendix can comment.