It was once considered (and probably still be by some) that functions should have one entry point (easy but was relevant when you consider assembly language) and one exit point.
One exit point is nice from a debugging standpoint (as in you can put one watch/break on one line and know you'll go through it) but can lead to some horrific nesting so more often than not readability tends to win out. Which produces the least nesting, the least lines of code and the most readable end result? Ultimately that tends to be far more important than anything else.
For what it's worth the last can be better expressed as:
return condition ? foo : bar;
assuming condition
isn't terribly long.
Don't get overly concerned with supposed code "purity". It's an irrelevant distraction. Make things readable and generally be consistent.