Yup its done wrong. The individual states should collect constitutionally appropriate taxes and then in turn fund the federal government to carry out its mandates such as regulating interstate commerce, protecting borders, etc. and nothing further.
The FedGuv should not be collecting taxes from state citizens directly and then doling it out back to the state governments with strings attached, having wastefully spent much in the process.