Under what circumstances could a project fail from the perspective of a government provided grant?
Funding audit is orthogonal to success
The criteria for success of a project generally rely on particular measurable goals as promised in the project application. Enforcement of that is often handled by making parts of funding conditional to submitting the required deliverables and evidence of appropriate milestones. Usually, no research project is optimistic enough to promise that conclusive results will be in these deliverables (if you already know the result, why is research needed?) but it may specify e.g. certain data sets, analyses, and quantity of scientific publications that must be delivered.
However, it's not really relevant to the question of misappropriated funds. A funding agency may (and often will) audit the expenses of successful projects, possibly randomly, and possibly all of them. For example, I have participated in grants where a proper third party audit (paid by the receiving institution) was a mandatory requirement in the project planning, an inalienable part of the contract, and a &quot;successful&quot; audit report was required for the final payments.
Furthermore, as with taxes, they don't actually have to investigate that much or prove anything - it's your duty to provide appropriate evidence. If they &quot;gave you $100,000 to find out whether camel milk is more nutritious for children 5-10 than cow's milk&quot; but you can only provide evidence of paying $50,000 for camels  because you spent the other $50,000 on something inadmissible, then you're simply not receiving the full $100,000 from them, no matter what scientific results your project achieved - and if they have already paid out more than that, then you legally owe them and they will collect it from the institution. And yes, the funding requirements will be set out so that they will disqualify any institutions where it's reasonably possible that they won't be able to repossess the advance.
Expenses are planned in detail beforehand
It's quite unlikely to simply be assigned &quot;$100,000 to do X&quot; - what would actually happen, is that the project plan would specify the expenses required for the project. If the submitted budget proposal states that your camel milk research is going to involve buying a fancy car for $50,000 then it's likely to rise issues before (and if) the project is selected and approved. If the approved budget proposal states that you'd spend $50,000 of the grant on camels and you then decide that you'd actually want to buy something else for that money (no matter if it's that car or directly buying camel milk instead of camels), then you'd generally have to get an approval from the funding agency for this modification.
Also, often the funding is structured so that they pay after the fact - i.e. the institution buys equipment and pays salaries, and the funding agency only reimburses these expenses when (and if) they're acknowledged as appropriate for the project goals. It's a reasonable scenario that sometimes happens that some expenses will not be reimbursed for some reasons - in that case, the institution has spent that money but won't get funding for it, tough luck. It may result in &quot;allocating&quot; that expense so that it reduces institutional funding available for that PI for other goals.