The Midrash recognises this problem when it notes that Vayikra ends, “If a person sins and deals deceitfully with his fellow in the matter of a deposit or pledge, or through robbery, then he shall restore that which he has taken,” whilst Tzav begins, “Command Aaron and his sons: This is the law of the burnt offering…”
The Midrash remarks that only if you have observed the first law can you carry out the second. Only if you have morally clean hands can you bring an offering to the Almighty.
In similar fashion, some siddurim begin with the verses, V’ahavta l’re’acha kamocha (Love your neighbour as yourself) and V’ahavta et HaShem Elokecha (Love the Lord your God); only if you have fulfilled the first can you hope to fulfil the second. You have to earn the right to pray by first trying to live a life of integrity.