Difference between MCMCsamp and sim

Trying to get confidence intervals on a fixed effect in a mixed model fitted with the lmer function in package lme4 in R. I can get distributions of beta using "mcmcsamp" function and estimate a confidence interval from that, but I can also do it using "sim" in the package arm. While they both give me similar results, I'm curious what the difference is. In neither case do I have a good grasp of what's going on 'under the hood' - the arm package documentation just states that it provides "posterior simulations". Do the two methods have different qualities or are they essentially the same? Thanks!


Point Mass at Zero

Both method generates a sample from the posterior distribution of the parameters using MCMC.
This might cover the basics

It is expected that the results from both the methods will be similar but slightly different-
1. For obvious fact that it is a stochastic process
2. May be these methods use different priors? e.g. just for example: one may use uniform /locally uniform prior while other may use normal prior (just to make up examples). I briefly checked their documentation but couldn't find any specific details on them.

If you increase the number of chains (e.g. from 1000 to 5000), you will find that the results from these two methods will get increasingly closer.

And finally, if you unsure what the code is exactly doing, checking the documentation helps: