The bar code makes the self-published book compatible with store scanning systems.
A book can have an ISBN without a bar code. The bar code just makes it easy for bookstores to scan your book into their systems.
Major bookstores will not accept a self-published book that does not have a clear bar code printed on the back cover.
In truth, you can self-publish a book without a bar code as long as you have an ISBN number printed on the inside cover of the book. The bookstore can then type in the ISBN number manually to pull up information about the book.
Distributors and wholesalers will usually not accept a self-published book without a bar code. You will also have trouble convincing reviewers that your self-published book should be taken seriously.