One reason to buy OBC ahead of time is to take advantage of a favorable exchange rate.
Another is to move ones spending onto an earlier credit card statement, rather than waiting until the end of the cruise and seeing their charges then.
This might be especially true if using the Celebrity branded credit card and approaching a points redemption amount. Let’s say you have 14,000 points and you need 15,000 to redeem for $150 off the price of a cruise. You anticipate spending $1000 on board on spa, shore excursions, etc. so by buying $1000 OBC ahead of the cruise, you achieve the 15,000 points and can redeem them.