How to generate an estimator for a parameter and then compare the two in R? Estimator is acquired using moment's method

Here is the code:

 paretobar<-rep(0,10000)
for (i in 1:10000){u<-runif(100);pareto<-u^(1/2);paretobar[i]<-mean(pareto)}
betahat1<-paretobar/(paretobar+1)
hist(betahat1, col = "sky blue")
mean(betahat1)## [1] 0.3997934
mean(paretobar)## [1] 0.666431


Originally the data is distributed with beta distribution, so I transform the uniformly generated data, so that they would be derived from Beta distribution. I don't get the second step where each data point in paretobar is computed by taking mean of the pareto. But it's something to do with expected value? Anyway in the results the estimator betahat1 is not equal to paretobar, but I havr a feeling, that they should be, maybe anyone sees an error in my code?