It is because he is bored. He had nothing to do so he was torturing them
Er, not exactly. In the earliest version of his mythology, Taisui Xingjun (太歳星君) was originally Yin Jiao, the crown prince of the Shang. When Daji came to seduce his father King Zhou of Shang, she entrapped Yin Jiao's mother and caused her execution. In retaliation, the princes Yin Jiao and Yin Hong killed the official who carried out the sentence and were themselves sentenced to death. Yin Jiao was taken away by the immortal Guang Chengzi and trained to take revenge on his own dad King Zhou (Hi, Luke!) but on the way to join the rebel army, the evil immortal Shen Gongbao persuaded Yin Jiao to instead help out his father. Originally reluctant, Yin Jiao was swayed when he was introduced to the decadence of the "wine pond and meat forest" (酒池肉林) in the palace, and his original upbringing as admittedly a spoiled as heck crown prince got the better of him. Shen Gongbao got him pardoned by his dad and King Zhou gave him his own wine pool. However, Yin Jiao's depravity very quickly exceeded his dad's and he turned the "meat forest" into "flesh forest" - impaling his own concubines - and the "wine pond" into a "blood pond". This turned the gallant prince into a deadly depraved Shang warlord and only the combined powers of Jiang Ziya and Guang Chengzi could overcome him. The tortured brides here might be a reference to the "flesh forest" in the old mythology.
Dude's story is basically "what if Luke became a Sith and helped Darth Vader instead?"
Okay, so how did he end up as a god after all that? Beats me. In the novel Investiture of the Gods, Jiang Ziya simply created him one. However, this novel was written over a millennium after worship of Yin Jiao as Taisui Xingjun started (probably in the Han Dynasty), so it's simply making room for the fact that he was already a god by then. In the later Ming Dynasty, perhaps aware of the problems with this character, he was "rehabilitated" and his story changed so that he actually helped the rebels as intended and killed Daji. However, Investiture of the Gods followed an older tradition from the 14th century despite being written in the 17th. Since Taisui Xingjun was actually a god of fortune AND misfortune, it is possible that he came from an earlier era in Chinese folk religion when it was more dualistic and it was basically a given that evil gods existed and must be appeased.