The Alien is intellegent enough to know that ripley has set the self destruct on the Nostromo and tries to survive by stowing away on the escape ship. The Alien initailly hides and once she realises it's there she makes it into some sort of locker, puts on a suit straps herself in and depressurises the ship and the alien is sucked into space. The audience is expected to have taken in that the Alien is an intellegent survive at all costs predator, it needs Ripley to pilot the ship to somewhere where there are more people etc etc so it's best chance would be to hide, unfortunately it gets discovered and ejected. If it killed ripley it would not survive itself. That's what I figured anyway!