Window senses more resistance. It stops. The alternative is you end up with something like Tesla's ****up:
Tesla blames child for getting her finger crushed in Model X door - Business Insider
Tesla's proving to essentially demonstrate what amateur hour looks like in auto manufacturing. Your window is doing exactly what it should be doing.