Why does subsurf modifier cause weird deformation at the end of a cylinder?
Not to get too technical, this is because there is no supporting geometry at the edges where the vertices transition into the larger face (the ngon) and the subsurf modifier will stretch these (for lack of better words) giving the bumpy look.
Two simple fixes are:
Extrude and scale the top edge ring in more to the center
Just select the top ring, hit E and scale it in a bit to the center.

OR
Merge all the vertices on the top edge ring at the center
Select the top edge ring or the top face (the ngon) and hit AltP. You still need to add supporting geometry or the problem will persist. An edge loop near the top edge ring should suffice. It's a flat hard surface so merging to tris should be fine.