The learning part is on the student, anyway. You can only assist them while they do it. And that mostly means breaking down stuff into lessons, taking care of the learning environment, answering questions as they arise, keep students from cutting each others hair off, and keep them busy until their parents come home from work (although I agree the last part is a bit of a cynical take).
1. To teach students whatever society deems at the time is general education. This is straightforward, don't think I need to elaborate here.
2. To widen the horizons of the youth on what's possible to do in the world. Ideally they'd inspire students and guide them towards their potential passions and interests. I'd never be here in tech if my 4th/5th grade teacher didn't inspire me into STEM. He worked at NASA before, he was my first exposure to Carl Sagan, he had all sorts of neat astronomical examples ready whenever the science unit came up. I didn't end up as an astronomer, but it did show me something I never would have looked into otherwise as a kid
3. A resource (or pointer to a resource) for students. Be it if the students are struggling in studies, are curious about particular topics, or want to try and plan a future pursuit. They should help students not only learn, but learn to learn.
4. Lastly, as a state guardian. A teacher should be one a child should feels safe confiding with should issues involving their parents, peers, or even other teaches arises. They should have some emotional intelligence to balance between what administration wants and what the student needs at that time. This also may include identifying mental or medical issues in students, and at least able to start the trail of investigation should there be more than lack of interest holding some students back.
If we compare notes we agree on #1, and you have maybe a small inkling of #3 and 4 for our definitions. The only separation from school and day care in your definition is the lessons, thought these days daycares also do that.
If society just wants government funded supervision while the parents engage in taxable labor for half their waking life (or more), we should just be honest about that.
The learning part is on the student, anyway. You can only assist them while they do it. And that mostly means breaking down stuff into lessons, taking care of the learning environment, answering questions as they arise, keep students from cutting each others hair off, and keep them busy until their parents come home from work (although I agree the last part is a bit of a cynical take).