The statements of optimism about the "new society" by two characters at the film's end are attributable to the film being completed after the communists won the Chinese Civil War.
The optimistic statements about a "new society" at the end of the film are likely a reflection of the post-communist victory in China and the potential for social transformation that it brought.