Reverse-Engineering a U.S. Navy Mystery Box

After all these years, it works! But what was it for?