To be the be-all, end-all company that builds products for other software businesses.
Buying the tech helps them get there faster. Also they don't just buy another product, HipChat has a very fanatical user base. It will likely be easy for Atlassian to get it adopted by the rest of their user base.
edit: as opposed to just building it themselves, what's so hard about a chat app? maybe i underestimate the amount of iteration in the hipchat product and they're buying that product knowledge, not the tech.