British maritime law is critical to the story of Billy Budd and how it resolves—not just in terms of how Billy Budd ultimately dies under the jurisdiction of naval law, but also in terms of the pragmatic considerations which underlie that resolution.
This is evident in chapter 22, when Billy is placed on trial after killing Claggart. The members of the drumhead court-martial sympathize with Billy's position, and it is even noted that under a regular court of law extenuating circumstances might have exonerated his actions. However, Captain Vere argues that, under this military tribunal, maritime law is clear: the punishment is death.
This verdict then raises a question: how does impressment enter into the picture? The answer is multifaceted. For one thing, it is ultimately through the practice of press-ganging that Billy Budd joins the British Navy: it wasn't by choice. The practice of impressment actually arose from practical implications; in order to attain large numbers of sailors, men were forcibly impressed into the British Navy against their will. This practice ultimately helped to shape the brutal severity that characterized British maritime law.
Finally, one should consider the context provided by the story's setting. Billy Budd is set in 1797, when Great Britain was at war with Revolutionary France and was reeling from the aftermath of large-scale mutinies in 1797. Thus, given the context, the subjects of mutiny and maritime law were of paramount importance in the British Navy at the time.