The risk ratio is a strictly deterministic function of the probabilities. This means it should be defined as
risk_ratio = pm.Deterministic('risk_ratio', p_exposed/p_notExposed)
That way when you sample from the joint posterior of "exposed" and "notExposed", they are converted into the (univariate) distribution of "risk_ratio". If you want to estimate the mean and standard deviation, you can pull it out of
np.std(trace['risk_ratio'])
By contrast, what this line does:
risk_ratio = pm.Normal("risk_ratio", mu=(p_exposed/p_notExposed), sd=sd)
is define a new Normal random variable with mean p_exposed/p_notExposed and deviation sd. Because there aren’t any observations of this random variable, there is no information to constrain sd, which is why the posterior of sd exactly matches the prior.