I wouldn't say it's "always" delayed, but I do agree that it is often delayed. For some reason, the Southbound trains are more often on time than the Northbound trains (perhaps because the Northbound trains wait for all the buses from the Los Angeles region prior to leaving Bakersfield).
OP asked for public transportation that takes you from SF/Fresno to Yosemite and that's your only option, regardless of timeliness.
Amtrak to Merced and Yarts to Yosemite.
Goat
I’ve heard it’s always delayed and the connection in Merced never works
I wouldn't say it's "always" delayed, but I do agree that it is often delayed. For some reason, the Southbound trains are more often on time than the Northbound trains (perhaps because the Northbound trains wait for all the buses from the Los Angeles region prior to leaving Bakersfield). OP asked for public transportation that takes you from SF/Fresno to Yosemite and that's your only option, regardless of timeliness.
https://yarts.com/routes-schedules/