Joining 3 tables while using MAX
Bids should be two tables:


BidHistory -- containing details about each bid
CurrentBid -- Either some details (redundant) about the latest bid, or where all the details live until moved to the other table.


This adds complexity to the "make a bid" code.  But it simplifies the code that needs to know what the current bid is.  And it avoids the complex code to fetch the latest bid.

The Strawman:

There is a serious flaw in the query that you presented.  MAX(bid.id) and MAX(bids.bid_amount) do not necessarily refer to the same row.  (OK, perhaps they do in a bidding situation, but you should not assume it!)  This is where you need "Groupwise Max" solutions.  See the [greatest-n-per-group] tag.  There are a lot of discussions here and on stackoverflow.com about how to find the row that contains the max (or min) value of a particular column.  Some solutions involve a subquery.  Some solutions are slower than others.

See also http://mysql.rjweb.org/doc.php/groupwise_max