It may even have been a bit of both. Agent sees that they have to get to MEL so asks the computer 'how can they get to MEL?', and it gives them a direct flight so they think 'hey wow that'll do'. It's not necessarily an error in that they might not have known you had a long enough connection in HKG, or that there were other flights to catch up with you, if you see what I mean, without finding your full booking record (do baggage services even have access to this anyway?)
Additionally, a direct flight (albeit not non-stop) requires only one set of screening as the containers for MEL will likely remain on the aircraft (or adjacent but unopened) during the stop. If it went into the HKG system as a rush bag for connection it could need re-screening there too.