From the docs
unclass returns (a copy of) its argument with its class attribute removed. (It is not allowed for objects which cannot be copied, namely environments and external pointers.)
The initial read of the csv file returns an object of class data.frame, and as.factor() casts it to class factor.
'data.frame': 500 obs. of 2 variables:
$ Color: Factor w/ 6 levels "blue","brown",..: 2 5 5 1 3 5 5 4 3 4 ...
$ Type : Factor w/ 2 levels "Brand X","M&Ms": 2 2 2 2 2 2 2 2 2 2 ...
After unclass() the result is a list
str(object1)
List of 2
$ Color: Factor w/ 6 levels "blue","brown",..: 2 5 5 1 3 5 5 4 3 4 ...
$ Type : Factor w/ 2 levels "Brand X","M&Ms": 2 2 2 2 2 2 2 2 2 2 ...
- attr(*, "row.names")= int [1:500] 1 2 3 4 5 6 7 8 9 10 ...
which gives you lists of 500 colors, 500 brands and 500 row names.