An attacker controlling more than half of the mining power could do a few things. For example.
They could declare certain transactions as invalid. By refusing to include them in their blocks and refusing to build on any block that includes them the unwanted transactions would see any confirmations they picked up quickly reversed. Someone trying to make money could use this to set minimum transaction fees. A government trying to regulate bitcoin could allow only addresses registered with the government.
They could collect all the mining rewards by refusing to build on anyone else's blocks, since the total mining rewards are roughly fixed this would get them more bitcoins than just taking their fair share of mining rewards.
They could spend bitcoins to get something non-bitcoin in exchange and then later reverse those transactions leaving the people they exchanged with out of pocket.
If the attackers aim is to make money these things are probably a bad idea. They would likely destroy the value of bitcoin and destroy the attackers profits
OTOH if the attackers goal is to destroy or subvert bitcoin these things may be more worth doing.
The danger is more that such an attacker would be able to censor transactions and dictate what valid transactions are and are not allowed by refusing to mine certain transactions. With sufficient hashrate, the attacker could refuse to build upon anyone else's blocks, and with a majority hashrate, he could then make his blockchain the accepted one because it would have more total work than any other chain. This would mean that transactions which the attacker does not like would never be confirmed as they never make it into a block on the main chain. Other than that, there isn't much that an attacker can do with majority hashrate, but it still would be a problem.