I'll take your two questions in reverse order...
>>>couldnt this have waited to our destination rather then doing a gate return ?
No. It's long been an industry interpretation that for MEL item deferral purposes, an aircraft was considered to have "departed" once it pushed back from the gate area, or otherwise began its forward taxi out of the gate area, and towards the active runway. After a major case involving an improper deferral back in 1989 that resulted in the captain and dispatcher losing their licenses for 180 days, and the airline being fined $60,000, attention was focused on the issue. It took a few years, but FAA legal essentially ruled that an aircraft taxiing between the gate and the active runway has *NOT* departed, and is subject to the same MEL conditions that it would be had the inop item been discovered before having pushed back from the gate.
>>>why did we have to return to the gate to get this item mel'ed
Not every item that fails during taxiout is a critical issue, and some, in fact, I'd say most are handled over the radio between the flight's captain and their dispatcher (even in a centralized office, we have comm ability anywhere with the aircraft). In the case of an inoperative APU, one of the MEL provisos, or conditions for dispatch, is that the APU area of the tail must receive a visual inspection to confirm that there was no damage from any potential APU fire. The crew can't do this while out on a taxiway, so a gate return is required. That particular proviso was changed a few years ago--prior to it, it was just defer the APU via radio and go... Not any more.
The crew on your flight did it by the book--what airline gets the kudos for professionalism?
ALL views, opinions expressed are mine ONLY and are NOT representative of those shared by Southwest Airlines Co.