The general equation of the Exponential Moving Average is given as follows:
EMA = (Current value x Multiplier) + (Prev. EMA x (1-Multiplier))
Where Multiplier = (2/(windowsize+1))
Thus, when we apply the movavg function to the two set of values, we naturally see a discrepancy in final averages, because the first EMAs calculated are not the same.
In the first case, the first actual EMA value is calculated at the third value, ie, 3, thus making the EMA = 2.25 as compared to the 3 in the other distribution (because of the lack of previous values)
Thus, this is not a mistake of the function, and the same function can be used to calculate the moving averages that you require to.