This happens to some JetBlue flights from BOS or (less commonly) JFK to SFO / OAK or (less commonly) LAX / LGB / SAN. It's often due to headwinds which tend to blow towards the East, making the flight from BOS to SFO usually longer than a SFO to BOS (where you are likely to see a tailwind)