As Catija pointed out in a comment, this is by design. This was confirmed on the network-wide meta in a pair of comments left by a Stack Exchange employee:
This is by design due to caching and timing. Occasionally you'll see this notification but your bounty will appear to have some time left.
The short version is that the topbar notifications / toasts are run on a scheduled interval, which will sometimes be just ahead of and sometimes just behind the actual bounty expiration
As other users on the same Q&A point out, this is counterintuitive and arguably incorrect behavior even if it's by design, but it doesn't sound like it'll be changing any time soon.