This randomized phase III trial studies how well pembrolizumab works in treating triple-negative breast cancer. Monoclonal antibodies, such as pembrolizumab, may interfere with the ability of tumor cells to grow and spread.