Generally, standing in an interior doorway is a far safer move.
You don't need to be in field in Kansas to be safe outside. If you're in the suburbs you have lawns, parking lots, or streets and there aren't windows above you. Obviously if you're in downtown LA or SF don't go outside. But there's a lot of people that don't live in, or aren't going to be in, an area with multi-story buildings completely surrounding them. You can easily get far enough away from a couple story building (parking lot) and be safe. That is much safer than inside said building.
Here's the rule of thumb "If something can fall on you outside, go to a door frame or braced structure." But I'll reiterate, it depends on your initial location.
The most useful place to be in a major earthquake is anywhere where things are not going to swing into or fall onto you. Such as underneath a desk (assuming it's not a cheap construction that will buckle under any significant weight).
The reason to stay indoors is if you're in a city or next to buildings where glass and shrapnel could fall on you. If you have open space outside, then that is a much better place to be.