Testing the Addition of an Anti-Cancer Immunotherapy Drug, Avelumab, to Gemcitabine and Carboplatin Chemotherapy Prior to Surgery in Muscle Invasive Urinary Tract Cancer vs. Surgery Alone in Patients Who Are Not Able to Receive Cisplatin Therapy (SWOG GAP TRIAL)

This phase II trial studies the effect of avelumab, gemcitabine and carboplatin before surgery compared with surgery alone in treating patients with muscle invasive bladder or upper urinary tract cancer who are not able to receive cisplatin therapy. Immunotherapy with monoclonal antibodies, such as avelumab, may help the body's immune system attack the cancer, and may interfere with the ability of tumor cells to grow and spread. Chemotherapy drugs, such as gemcitabine and carboplatin, work in different ways to stop the growth of tumor cells, either by killing the cells, by stopping them from dividing, or by stopping them from spreading. Giving avelumab together with gemcitabine and carboplatin before surgery may work better in lowering the chance of muscle invasive urinary tract cancer growing or spreading, in patients who cannot receive cisplatin therapy compared to surgery alone.

PRIMARY OBJECTIVE:

I. To compare pathologic complete response (pCR, pT0N0) with avelumab plus gemcitabine and carboplatin (AGCa) versus (vs.) no neoadjuvant therapy preceding protocol surgery for muscle-invasive bladder cancer or upper tract urothelial carcinoma (MIBC/UTUC) for participants who are ineligible for cisplatin-based chemotherapy.

SECONDARY OBJECTIVES:

I. To evaluate toxicities with AGCa, and to compare resectability rates and surgical complications by arm in this population.

II. To compare event-free survival (EFS) with AGCa versus no neoadjuvant therapy in this population.

III. To compare overall survival (OS) with AGCa versus no neoadjuvant therapy preceding surgery in this population.

IV. To compare pathologic complete response (pCR, pT0N0) with avelumab plus gemcitabine and carboplatin (AGCa) vs. no neoadjuvant therapy preceding protocol surgery in the subset of participants who received at least 2 cycles of neoadjuvant therapy in Arm A.

BANKING OBJECTIVE:

I. To bank tumor tissue, blood, and urine for future correlative genomic, transcriptomic, and proteomic studies to discover molecular signatures associated with pCR and resistance.

OUTLINE: Patients are randomized to 1 of 2 arms.

ARM A: Patients receive avelumab intravenously (IV) over 60 minutes on day 1. Treatment repeats every 14 days for up to 6 cycles in the absence of disease progression or unacceptable toxicity. Patients also receive gemcitabine hydrochloride IV over 30 minutes on days 1 and 8 and carboplatin IV over 30 minutes on day 1. Treatment repeats every 21 days for up 4 in the absence of disease progression or unacceptable toxicity. Within 4-8 weeks after final systemic therapy, patients undergo standard of care surgery.

ARM B: Patients undergo standard of care surgery.

After completion of study treatment, patients are followed up every 12 weeks for years 1-2, every 6 months for year 3, then annually in years 4-5.

Eligibility Criteria:
Inclusion Criteria:

* Participants must have one of the following:

  * Histologically documented muscle-invasive bladder carcinoma (MIBC) from transurethral resection of bladder tumor (TURBT) within 56 days prior to registration
  * Histologically confirmed high grade upper tract urothelial carcinoma (UTUC) within 56 days prior to registration, with invasion confirmed by either a mass on cross-sectional imaging or a tumor directly visualized during upper urinary tract endoscopy within 56 days prior to registration
  * Participants diagnosed with mixed urothelial carcinoma and variant histology within 56 days prior to registration may be eligible if the majority (\> 50%) of the tumor consists of urothelial carcinoma. Participants with pure non-urothelial variant histologies or any small cell histology are not eligible
* Participants must have clinical stage T2-T4aN0M0 bladder or upper tract cancer confirmed by radiologic staging (computed tomography \[CT\] scan/magnetic resonance imaging \[MRI\] abdomen and pelvis, and CT scan/x-ray of the chest) within 56 days prior to registration
* Participants must have a bone scan within 56 days prior to registration if they have bone pain or elevated serum alkaline phosphatase
* Participants must have a bimanual examination under anesthesia within 56 days prior to registration
* Participants must not have received prior systemic chemotherapy, immunotherapy or radiotherapy for the treatment of muscle invasive bladder cancer (MIBC) or upper tract urothelial carcinoma (UTUC). Other prior pelvic radiotherapy is allowed if it does not preclude surgery (radical cystectomy, nephroureterectomy or ureterectomy, based on location of primary tumor). Prior intravesical therapy is allowed
* Participants must not have received immunosuppressive medication within 14 days prior to registration, with the exception of intranasal, inhaled, topical steroids, or local steroid injections (e.g., intra-articular injection) systemic corticosteroids at physiologic doses not to exceed 10 mg/day of prednisone or its equivalent
* Participants must be \>= 18 years of age
* Participants must have Zubrod performance status 0-2
* Participants must have history and physical examination within 28 days prior to registration
* Participants must be surgical candidates as deemed by the local site oncologic surgeon within 28 days prior to registration. This must be clearly documented
* Participants must have a serum creatinine =\< the institutional upper limit of normal (IULN) OR measured OR calculated creatinine clearance \>= 30 mL/min using the Crockroft-Gault Formula. This specimen must have been drawn and processed within 28 days prior to registration
* Participants must be deemed cisplatin-ineligible based on greater than or equal to 1 of the following:

  * Zubrod performance status = 2
  * Creatinine clearance (calculated by Crockroft-Gault formula or measured) 30 to \< 60 ml/min,
  * Neuropathy \> grade 1
  * Hearing loss \> grade 1
  * Congestive heart failure \> grade 2
* Hemoglobin \>= 9.0 g/dL (within 28 days prior to registration)
* Absolute neutrophil count \>= 1,500/mcL (within 28 days prior to registration)
* Platelets \>= 100,000/mcL (within 28 days prior to registration)
* Total bilirubin =\< 1.5 x institutional upper limit of normal (ULN) (within 28 days prior to registration)
* Aspartate aminotransferase (AST) =\< 2.5 x institutional ULN (within 28 days prior to registration)
* Alanine aminotransferase (ALT) =\< 2.5 x institutional ULN (within 28 days prior to registration)
* Participants with known history or current symptoms of cardiac disease, or history of treatment with cardiotoxic agents, must have a clinical risk assessment of cardiac function using the New York Heart Association Functional Classification and be class 2B or better
* Participants with known human immunodeficiency virus (HIV) must be on effective anti-retroviral therapy and have undetectable viral load at their most recent viral load test and within 6 months prior to registration

Exclusion Criteria:

* Participant must not have any other prior malignancy except for the following: adequately treated basal cell or squamous cell skin cancer, in situ cervical cancer, prostate cancer Gleason score =\< 3+4 in active surveillance, adequately treated stage I or II cancer from which the participant is currently in complete remission, or any other cancer from which the participant has been disease free for two years
* Participants must not be pregnant or nursing due to the risk of harm to a fetus or nursing infant. Women/men of reproductive potential must have a negative serum or urine pregnancy test within 28 days prior to registration and must have agreed to use an effective contraceptive method. A woman is considered to be of "reproductive potential" if she has had menses at any time in the preceding 12 consecutive months. In addition to routine contraceptive methods, "effective contraception" also includes heterosexual celibacy and surgery intended to prevent pregnancy (or with a side-effect of pregnancy prevention) defined as a hysterectomy, bilateral oophorectomy or bilateral tubal ligation. However, if at any point a previously celibate participant chooses to become heterosexually active during the time period for use of contraceptive measures outlined in the protocol, he/she is responsible for beginning contraceptive measures
* Participants must not have a history of active primary immunodeficiency
* Participants must not have a history of or active autoimmune or inflammatory disorder, with the exception of vitiligo, alopecia, hypothyroidism (stable on hormone replacement), or chronic skin condition that does not require systemic therapy