Up until President Truman ordered the armed forces integrated in 1950, the Navy was considered the most racist branch of the military and the consensus was that Negroes in the Navy could never expect to serve in any capacity other than menial positions such as Aides or Sewards or Cooks which was what Dorrie Miller was, the heroic black sailor made famous for grabbing a machine gun and joining his crew mates in shooting down Japanese planes during the raid on Pearl Harbor.
During World War II, my brother joined the Navy and quite a few people, a lot of whom were his friends, couldn't understand why, considering how prejudiced it was. Everybody else just waited to be drafted into the Army. I was just a kid then and I don't remember the reason he gave, but I think my father advised him to do so, something about enlisted men having more options(?). I do know that he scored very high on the tests given and was eventually assigned to the USS Mason which was the first vessel manned by an all black crew. I also remember him recounting an incident when he was stationed in Norfolk, Virgina, and was coming back from leave waiting for a bus to take him back to the base. When the bus arrived and he tried to get on, the driver told him the bus was so crowded that there was no room in the back of it which was where Negroes were expected to sit in the south, so he couldn't board it. According to my brother, what the bus was crowded with was a bunch of drunk sailors who became indignant about a fellow sailor being told to get off, and they rushed forward, threw the driver out, and one of them drove the bus back to the base.
Later in the 1980s, my son joined the Navy and served on the USS Eisenhower, an aircraft carrier which spent 90 days on alert in the Indian Ocean during the Persian Gulf hostage crises. He never reported any racial incidents among the crew of about 2000, but he was among the great numbers of sailors and navy vets disgusted with the decision to integrate the sexes in the arm forces, something which resulted in women being assigned to the Eisenhower. He couldn't believe they'd allow females to trespass on this hallowed ground of male exclusivity!