An eye exam is more than just getting your prescription, though. They also screen you for eye diseases and assess your overall eye health, which the online services don't do.
I just had an eye exam last month and it was around $50. That was just for the prescription and it took around 15 minutes. Everything else was an up charge. The most expensive option was some kind of scan of my retina for an additional $40.