The Sydney Harbour bridge carries train (and bicycle) traffic on its western side. This is a shot of a mixed suburban electric set on the ramp from bridge to tunnel, just short of the tunnel itself. Next stop Wynyard station.
What is less well known is that the eastern side was designed for the same purpose, but for a heavy rail line that was never built. The line would have gone from Wynyard to the northern beaches, however the tide of public opinion (or perhaps political will) turned against infrastructure investment and plans for the line were filed away. However a somewhat less costly option was taken up: trams. As Sydney had an extensive tramway network on both sides of the harbour, it made sense to connect the 2 'halves' as it were and thereby avoid avoid maintenance facility duplication, tram/rail interchanges or even truck transport, whilst also providing a service to commuters.
Of course this impacted ferry use, but not as much as a heavy rail line would have. Manly's tram network was an isolated one, cut at the Spit, so whilst some commuters would not mind a short (mostly covered) walk over the Spit bridge, many more would still choose the ferry.
So the compromise bought a cheaper but less useful light-rail line but at the price of a 'proper' straight-through heavy rail line. A compromise that may still have paid dividends today, except we tore up the tram system by 1961. Which leaves us with buses and extra roadlanes on the bridge.
The tramline (whilst it lasted) paralleled the rail in many ways, with a tunnel to platforms at Wynyard (now deserted and partially used as car parking), a station at the Milson's Point side and a flyover bridge to North Sydney. The approach to that bridge is used (again) as car parking .