When I first started playing I thought it was expensive since the wild Pokemon in the beginning areas only gave around 8 dollars per battle, but as I progressed through the game and later learned how much people sold Pokemon for, the cost of the bike isn't that expensive when put into that perspective. If you sold a few Pokemon that had really good stats, or a shiny Pokemon, you could obtain 500k for a bike relatively quickly.
As for me, I disliked parting with most Pokemon so I ended up obtaining 500k through battling all the NPCs when they were available for rebattling and training in areas with high level wild Pokemon. It took a very long time (because I bought the great ball upgrade before the bike) but it's possible to work towards a bike that way. As others said the bike is mostly a luxury for fast travel, and often times I find myself just walking from place to place because there are many checkpoint buildings (such as around Saffron) and some caves that kick you off your bike when you enter them and clicking the bike icon over and over is sometimes a hassle when I'm lazy.