This is actually not specifically related to having them in two projects. Rather, it’s because there is a basic behavior of Asana that subtasks do not automatically belong to the project that their parent task is in. By default, a subtask doesn’t belong to any projects.
If that seems like an odd behavior, you’re not alone. See (and vote in) this forum thread for more info.