I hear a lot of people in mainland China use the former (never from Taiwanese Mandarin) when saying a phrase as a sort of command, but I'm still not sure about why someone would say it.
Their meanings are somewhat different. In a few situations, they are interchangeable, but there are many others where you can only use one and not the other. The key difference is that 呗 is much more assertive, even rhetorical, whereas 吧 can be used to express doubt or uncertainty as well. For completeness I'll cover them all.
Definitions taken from zdic.net
(1) 用在句末,表示恳求、提议、请求、命令等语气 [(used at the end of a sentence) indicating entreaty, suggestion, command, etc.]。如:派六个人不够吧,我的意见派十个人;你说给大家听听吧!
(2) 用在句末,表示同意、认可的语气 [indicating agreement or acknowledgment]。如:好吧,我一定去;就这样执行吧
(3) 用在句末,表示疑问语气,带有揣度的意味 [indicating doubt]。如:他现在赞同了吧?你弄通了吧?
(4) 用在句末,表示估量、推测语气 [indicating uncertainty]。如:他自己总该知道吧;老王会到这边来吧
(5) 用在句中,表示停顿,带假设语气,并带有列举性质 [indicating a pause]。如:说吧,不好;不说吧,也不好
When expressing a foregone or obvious conclusion, you can only use 呗. Let's examine the example:
Here the speaker is saying that the solution, to learn how to ride a bike, is obvious, and doesn't need asking, as if the question was rhetorical. If you change the 呗 to a 吧, then the implication changes:
Here the solution of learning to ride a bike is more of a suggestion, and that other solutions may also be valid.
When expressing reluctant agreement, use 呗, although 吧 can also be used. Let's examine this:
Here the speaker is expressing reluctance that "you" have to go. The speaker could replace it with 吧:
But unless expressed elsewhere with tone or context, the tone of this sentence is ambiguous, and not necessarily reluctant.
When used as a suggestion or command, you can use either 吧 or 呗:
When expressing agreement or acknowledgement, you would use 吧. Sometimes you can use 呗 as well, but watch out for its more assertive tone:
When used to indicate doubt or uncertainty, you can only use 吧:
There's another special use of 吧, as a pause in speech. In this manner, it is interchangeable with characters like 呢. 呗 doesn't have this usage.