Setting OFS, the output field separator, looks like it should change the output. On its own it does nothing, and that confuses people.
printf 'a b c\n' | awk -v OFS=, '{print}' # a b c
printf 'a b c\n' | awk -v OFS=, '{$1=$1; print}' # a,b,c
awk keeps the original line in $0 as long as you don’t touch a field. Only when a field is assigned does awk rebuild $0 from the fields, joined with OFS. $1=$1 changes nothing about the value, but it forces that rebuild. As a side effect, runs of spaces collapse into one separator, which is exactly what you want when turning aligned command output into CSV:
df -P | awk -v OFS=, '{$1=$1; print}' > df.csv
You’ll also see the short form awk '{$1=$1}1', where the 1 is a condition that’s always true and prints the line.
This isn’t a real CSV writer though. A field with a comma in it, or a column that contains spaces like a file name, ends up split or mixed up. For df output with mount points that contain spaces, I’d check the result before importing it anywhere.
Further reading: GNU awk manual, POSIX awk specification