Illegality is the state of being against the rules or the law. Sometimes you have to break the law to effect change. The students knew the illegality of their actions, and that they might be arrested, but they figured it was worth it to change a bad law.
The root word of illegality is legal, which is from the Latin word legalis, which means related to or pertaining to the law. Il- means not, so illegal means "not legal," and -ity is a suffix used to make an adjective a noun meaning the "state of or condition of." So literally, illegality is the condition of being not legal. Despite the illegality, people often break the law when it comes to speed limits.