From `:help U` > Undo all latest changes on one line, the line where the latest change was made. U itself also counts as a change, and thus U undoes a previous U.