I don't believe the Alien hid in the shuttle because it knew or sensed danger. It may've been looking for a quieter place to rest (or die?). The interior of the shuttle (at that time) was also much darker than the ship's corridors - the creature appears to have an affinity for the dark.
It was just plain bad luck it happened to be in there - as it was earlier, in the corridor, blocking the shuttle's access from Ripley.