The most likely scenario is that my grandmother got it wrong. Beulah was not adopted. She was born in 1877 in [or, as you say, near] San Francisco where her mother had gone in order to give birth in a civilized place with accessible medical care. I haven't caught my grandmother in any other major error, though. I'd be shocked to learn that she got this wrong.
The other somewhat plausible possibility is that Mary Fenn Logan went to San Francisco in 1877 for an undisclosed medical reason and, while she was there, adopted a recently born and motherless baby. But in that case, how would she have fed baby Beulah, barely two months old? The trip out to Micronesia was a couple of months at sea mostly on a rickety missionary schooner and then once they got there, there was no milk, not even any cows.
Or maybe her son got the place and/or date of her birth wrong on the death certificate.