Khloe buys cookies and onions at the store.

She pays a total of $53.21.
She pays a total of $6.25 for the cookies.
She buys 8 bags of onions that each cost the same amount.

How much does each bag of onions cost?

The total cost of the cookies and onions is $53.21 - $6.25 = $<<53.21-6.25=46.96>>46.96.

Thus, each bag of onions costs $46.96 / 8 = $<<46.96/8=5.87>>5.87. Answer: \boxed{5.87}.