I've got several (three kids worth, mostly outgrown) Trek mountain bikes in the $500 range in my garage and they have all been absolutely rock-solid and almost maintenance-free. My kids have really beat on them, too, and we have taken them to Utah and other places that really push the limits of their capabilities. I cannot think of a single significant problem with any of these bikes, and they will make good used/donation bikes for someone else's kids when I get around to cleaning them up and getting rid of them.
They are $500 bikes with comparatively cheap but solid components and very robust frames, assembled and adjusted competently. These aren't BBS bikes.