What does comparing mean rank mean? Lets assume that I am having 2 samples:
Sample A
20
20
20
20
25

and Sample B
1
2
3
4
5

If I want to compare these two samples I can use the mann-whitney test. Now, because the 2 samples are not normally distributed, and their distributions do not have the same shape, the mann-whitney test will compare the mean ranks.
So what it will do, is rank each observation of each sample. The rank will be the following:
Sample A
 value  rank
    20  2.5
    20  2.5
    20  2.5
    20  2.5
    25  5

and Sample B
value  rank
    1  1
    2  2
    3  3
    4  4
    5  5

Now, both of those samples have the same mean rank (2.5+2.5+2.5+2.5+5)/5 and (1+2+3+4+5)/5, but their medians are very different.
Also it seems to me, that two populations of the same size, will always have the same mean rank. Or am I wrong ?
So I do not understand, what is the value of comparing the mean ranks of two populations. Any help ?

When comparing two independent samples, you want to rank all the data together.
Revising your example:
Sample A
 value  rank
    20  7.5
    20  7.5
    20  7.5
    20  7.5
    25  10

and Sample B
value  rank
    1  1
    2  2
    3  3
    4  4
    5  5

What is going on?
Sample B's value of 1 is the lowest ordered value from both samples, so it gets a rank of 1. Similarly for Sample B's values of 2–5. The mean rank for Sample B is therefore $\frac{1+2+3+4+5}{5}=2.5$.
Sample A's values of 20, 20, 20, and 20 occupy the 6th, 7th, 8th, and 9th ranks together, so they each get the average rank of $\frac{6+7+8+9}{4\text{ rank positions}}=7.5$. Finally, Sample A's value of 10 is the largest value from both samples so it gets the highest rank 10. The mean rank for Sample A is therefore $\frac{7.5+7.5+7.5+7.5+10}{5}=8$.
Bonus: To be super explicit: No. The mean ranks of two independent samples of the same $N$ will not necessarily have the same mean ranks.
