のは悪いことだ

it's bad to

→ の
phrase Rare #29,078
it's bad to Follows a verb phrase; の nominalizes the action, making the pattern mean “doing ... is a bad thing.” Often followed by と思う or と考える when expressing an opinion.
JA: 人をだますのは悪いことだ。
EN: It's bad to deceive people.

ムニ盗むのは悪いことだ

Muni, stealing is wrong.

— バジュランギおじさんと、小さな迷子 (2015)

試験でカンニングするのは悪いことだみんなが考えている

Everyone thinks that cheating on an exam is wrong.