Depends on the country. In many (vast majority of?) countries bills are individually passed, i.e. a few pages of text at a time. I imagine in those countries, a substantial fraction of the members in the assembly do read the bill before voting, even if they vote according to the party line.
The actual situation is that the politicians are paid by outsiders who write the bills which the politician then submits. It's like outsourcing to North Koreans but getting paid by them as well as your actual employer.
They read the parts they care about very closely, and get a high level overview of the parts they don’t - or rely on relationships that the parts they don’t care about will be filled in reasonably.