The origin and purpose behind a drift charm is to show racers/drivers behind how "sick" their drift is. This is because as they drift their car, the drift charm will swing and will appear to stay afloat, which warns other drivers/racers that he/she is a good drifter, or has a good drift car. Hence the name, "drift charm", is given to these objects/toys hanging from the back of cars.
Sometimes boy racers put drift charms on their cars to show other racers how low, or slammed, their car is, as the drift charm will show how close it is from touching the ground/road.
But more typically, such as in the US, street racers going to will put a drift charm to show other racers that they are keen for a race, especially during street race meetups.
Even though drift charms are usually used by street racers, sometimes "ricers" like to put drift charms on their cars as a decoration, simply because they think it is cute, and/or funny to put one on their car.
Timmy: stfu dude, spongebob is awesome!
Billy: wanna race then, faggot?