Used when expressing a preference between two choices, where neither is ideal. The first choice is either not feasible or inappropriate, so the second choice is selected instead.
Example
그영화를볼바에야차라리책을읽겠어요.
Rather than watching that movie, I would prefer to read a book.
혼자갈바에야친구랑같이가는게낫겠어요.
If I have to go alone, it's better to go with a friend.