The school cannot immediately escape from the ideals set by prior social conditions. But it should contribute through the type of intellectual and emotional disposition which it forms to the improvement of those conditions.
This state of affairs explains many things in our historic educational traditions. It throws light upon the clash of aims manifested in different portions of the school system; the narrowly utilitarian character of most elementary education, and the narrowly disciplinary or cultural character of most higher education. It accounts for the tendency to isolate intellectual matters till knowledge is scholastic, academic, and professionally technical, and for the widespread conviction that liberal education is opposed to the requirements of an education which shall count in the vocations of life. But it also helps define the peculiar problem of present education. The school cannot immediately escape from the ideals set by prior social conditions. But it should contribute through the type of intellectual and emotional disposition which it forms to the improvement of those conditions. And just here the true conceptions of interest and discipline are full of significance. Persons whose interests have been enlarged and intelligence trained by dealing with things and facts in active occupations having a purpose (whether in play or work) will be those most likely to escape the alternatives of an academic and aloof knowledge and a hard, narrow, and merely "practical" practice. To organize education so that natural active tendencies shall be fully enlisted in doing something, while seeing to it that the doing requires observation, the acquisition of information, and the use of a constructive imagination, is what most needs to be done to improve social conditions. To oscillate between drill exercises that strive to attain efficiency in outward doing without the use of intelligence, and an accumulation of knowledge that is supposed to be an ultimate end in itself, means that education accepts the present social conditions as final, and thereby takes upon itself the responsibility for perpetuating them. A reorganization of education so that learning takes place in connection with the intelligent carrying forward of purposeful activities is a slow work. It can only be accomplished piecemeal, a step at a time. But this is not a reason for nominally accepting one educational philosophy and accommodating ourselves in practice to another. It is a challenge to undertake the task of reorganization courageously and to keep at it persistently.
I put in bold and italics the original quote and put in bold other sections that may help answer the question.
Dewey would like to reorganize education, but he needs to clarify what the "present social conditions" are of education. He does this by claiming those present social conditions are an oscillation between "drill exercises that strive to attain efficiency" and "accumulation of knowledge" that is "an ultimate end in itself".
To move past these social conditions is "show work" and it must be done in a "piecemeal" fashion. This is a "challenge" requiring courage.
To focus more on the quoted text, Dewey admits that "the school cannot immediately escape from the ideals set by prior social conditions". Those are the ideals that encouraged a "narrowly utilitarian character" and a "narrowly disciplinary or cultural character". However, the school, through an "intellectual and emotional disposition", should be able to improve on these conditions.
John Dewey, Democracy and education, the Project Gutenberg EBook produced by David Reed, and David Widger https://www.gutenberg.org/files/852/852-h/852-h.htm