Another way to say "attending a lecture is for learning" is "Learning is one function of attendance at a lecture."