Ductile materials are good in Tension. So, Steel being a ductile material is also strong in tension. Brittle materials are good in Compression. So, concrete being a brittle material is also strong in compression. So, the place of steel reinforcement depends on the place where tension is generated.
So in the case of simply supported beam compression occurs at top and tension in the bottom. That’s why we generally provide reinforcement in the bottom. While in the case of the cantilever beam tension occurs at top. That’s why we provide reinforcement on top in order to give strength the structure in tension.