Some agents offer editorial input and some don't. But for publishing houses, yes, it's standard for the work to be edited before publication. Often it goes through multiple passes, with one editor offering more big picture suggestions about plot and characterization, then another doing copy editing. In all cases the changes generally aren't set in stone. They're recommendations; it's up to the author to accept or reject them.