Motivation for professional and educational activities as a factor affecting the quality of education