It's really not.
I assume by ranking you mean 'Reputation'. You can buy all the Steem Power you want by purchasing Steem on an exchange and then sending it to yourself and powering up. Reputation on the other hand you can only get through upvotes. The higher the accounts upvoting you, the higher your reputation gets. This however, doesn't mean much since being upvoted by bitbots, etc will also increase your reputation... so rep is no guarantee of popularity or quality work.
What would happen theoretically if you have a lot of steempower and then upvote your own posts and comments?
That's completely fine... apparently if you upvoted your own posts 10 times a day (the maximum that would allow you to regenerate your Voting Power to 100% for the next day) then you'll double your account within 180 days (6 months).
The drawback is that there are some accounts on Steemit that take offense to exactly this activity and will flag people who do it 'too much'... but lots and lots of people do it.