Bialgebraic structures arising from 2-Segal spaces