You can get in line for an attraction up untill closing time. After closing time you are not allowed to ride anymore attractions. The shops near the exit do stay open longer, so you can linger for a while until most people have cleared out, if you want to avoid a long line at your bus stop.
To answer your question, no, they do not extend park hours. The park hours are set ahead of time using the occupancy in Disney and the surrounding area hotels. Disney has an idea of how crowded a park will be well before the day arrives.