Spoilers are supposed to change airflow above, around and underneath vehicles to reduce wind resistance (or drag) or use the air to create more downforce and enable more grip at high speeds. They’re designed to “spoil” the airflow to reduce its negative effects.
Related: What Does Hemi Mean?