Are the plants beneficial because they produce oxygen?
Lots of pages could be written on this. All trees are producing oxygen: thus all plants are beneficial, moreover ecologically every organism is important; but YES, some plants are more beneficial for human use.
Plants are main source of our food, but today farming is done even for bioremediation of toxic chemicals. There are medicinal herbs, there are plants which harbour nitrogen fixing bacteria in roots (thus enriches the soil), plants which keep our indoor air clean, and list of benefits we derive from plants is endless.