They are definitely purely motivated by profit - and that's a good thing. It means they do exactly what we need them to do, which is to compete against each other to generate blocks to add to the blockchain by carrying out the maximum possible amount of "proof of work", or "hashing". In doing so, they ensure that the blockchain cannot be faked because the blocks they make take so much work to generate that they cannot be replicated by an attacker.
The problems would only come if miners start being motivated by other things - for example, if governments started to carry out mining, in order to censor transactions, rather than to make money. This is a relevant concern that people think and discuss about, but for various reasons - which you can find out about if interested - it doesn't seem likely to be a big problem.
Another thing to put your mind at rest, perhaps. In 2017 all the big companies in bitcoin, including the overwhelming majority of the miners, got together and agreed to make a change to bitcoin's protocol - by increasing the size of the blocks. There was a lot of controversy, as most developers and grassroots users disagreed with the idea. The companies published plans to make a hard fork that would implement their plan - but they had to abandon their project when it became clear that users and markets disagreed, and that the fork they created would have less value than the original bitcoin. If miners had power then this would not have happened.
Finally, if miners do ever begin to act against bitcoin's interests, it is actually quite easy to change the hashing algorithm used by bitcoin. This would immediately destroy all mining businesses, as the equipment they had invested $billions in would be worthless. It's not something you'd choose to do, as it would cause some disruption, but miners ultimately know that they cannot ever threaten users because if it becomes necessary, users will destroy them.
I hope that helps!