This randomized phase III trial studies how well pembrolizumab works in treating patients with bladder cancer that has spread from where it started to nearby tissue or lymph nodes. Monoclonal antibodies, such as pembrolizumab, may interfere with the ability of tumor cells to grow and spread.