Fortified Islands For Defense
The U.S. prioritized the construction of defense forces on Alcatraz Island because they feared that the numerous people coming daily into San Francisco Bay could pose a threat. They never knew when their enemies could be hiding in one of the civilian ships.
Aside from Alcatraz Island, they also wanted to make sure a nearby island called Fort Point got fortified as well. People were optimistic about Alcatraz Island, and no one ever expected that it would turn into a prison in the future. John C. Fremont was indeed not supportive about whatever direction his island was heading to.