Because we can. Just like humans, dogs can get the hiccups. Mostly this happens with puppies if they eat or drink too fast. They usually outgrow this.
Sometimes I still get the hiccups just because. Mostly hiccups are harmless, but if you notice other symptoms such as vomiting, see your dreaded vet.