  Motivated by a question of Rota, this paper studies the relationship between
Rota--Baxter algebras and symmetric related functions. The starting point is
the fact that the space of quasi-symmetric functions is spanned by monomial
quasi-symmetric functions which are indexed by compositions. When composition
is replaced by left weak composition (LWC), we obtain the concept of LWC
monomial quasi-symmetric functions and the resulting space of LWC
quasi-symmetric functions. In line with the question of Rota, the latter is
shown to be isomorphic to the free commutative nonunitary Rota--Baxter algebra
on one generator. The combinatorial interpretation of quasi-symmetric functions
by $P$-partitions from compositions is extended to the context of left weak
compositions, leading to the concept of LWC fundamental quasi-symmetric
functions. The transformation formulas for LWC monomial and LWC fundamental
quasi-symmetric functions are obtained, generalizing the corresponding results
for quasi-symmetric functions. Extending the close relationship between
quasi-symmetric functions and multiple zeta values, weighted multiple zeta
values and a $q$-analog of multiple zeta values are investigated and a
decomposition formula is established.
