Even though the Law of Moses says that the priests must be descendants of Levi, those priests cannot make anyone perfect. So there needs to be a priest like Melchizedek, rather than one from the priestly family of Aaron.
The Law teaches that even Abraham's descendants must give a tenth of what they possess. And they are to give this to their own relatives, who are the descendants of Levi and are priests.
Levi's descendants are now the ones who receive a tenth from people. We could even say that when Abraham gave Melchizedek a tenth, Levi also gave him a tenth.