Complex sentence: The Garrison existed primarily to defend the Royal Naval Dockyard (HM Dockyard Bermuda) and other facilities in Bermuda that were important to Imperial security until the HM Dockyard was closed (a process that was carried out between 1951 and 1957).
Split into simpler sentences: The Garrison existed primarily to defend the Royal Naval Dockyard (HM Dockyard Bermuda) and other facilities in Bermuda which were important to Imperial security. When the HM Dockyard was closed (a process that was carried out between 1951 and 1957).