Inclusion Criteria:
* Women of age \>=18 years
* PRE-REGISTRATION: Clinical T1-4, N0-3, M0 breast cancer at diagnosis (prior to the start of neoadjuvant chemotherapy) by American Joint Committee on Cancer (AJCC) staging version 8.
* Note: Benign breast disease, lobular carcinoma in situ (LCIS) or ductal carcinoma in situ (DCIS) in the ipsilateral or contralateral breast is allowed.
* Note: Additional ipsilateral or contralateral invasive breast cancer is allowed. The index lesion is the largest triple-negative, chemotherapy-resistant lesion.
* PRE-REGISTRATION: Histological confirmation of triple negative invasive breast cancer (defined as estrogen receptor \[ER\] =\< 10%, progesterone receptor \[PR\] =\< 10% and HER2 not amplified by in situ hybridization \[ISH\] or immunohistochemistry \[IHC\] 0/1) at diagnosis.
* PRE-REGISTRATION: Cohort A: CLOSED TO PRE-REGISTRATION and REGISTRATION as of protocol amendment 6 (04/14/2023) Neoadjuvant chemotherapy (NAC) with one of the following regimens that was not discontinued early due to intolerability with less than 50% of planned treatment given due to disease progression or patient request:
* Paclitaxel or docetaxel followed by one of the following: the combination of doxorubicin and cyclophosphamide (AC); the combination of epirubicin and cyclophosphamide (EC) or the combination of 5-fluorouracil, epirubicin and cyclophosphamide (FEC)
* Note: Carboplatin may be added to these regimens
* AC or EC or FEC followed by docetaxel or paclitaxel
* Note: Carboplatin may be added to these regimens
* Docetaxel in combination with doxorubicin and cyclophosphamide (TAC)
* Docetaxel in combination with cyclophosphamide (TC) (for patients who are not candidates for anthracyclines)
* Carboplatin or cisplatin in combination with a taxane (paclitaxel, docetaxel, or nab-paclitaxel) (for patients who are not candidates for anthracyclines)
* PRE-REGISTRATION: Cohort B: Neoadjuvant chemotherapy (NAC) with one of the following regimens in combination with pembrolizumab that was not discontinued early due to intolerability with less than 50% of planned treatment given due to disease progression or patient request:
* Paclitaxel or docetaxel followed by one of the following: the combination of doxorubicin and cyclophosphamide (AC); the combination of epirubicin and cyclophosphamide (EC) or the combination of 5-fluorouracil, epirubicin and cyclophosphamide (FEC) Note: Carboplatin may be added to these regimens
* AC or EC or FEC followed by docetaxel or paclitaxel \[Note: Carboplatin may be added to these regimens\]
* Docetaxel in combination with doxorubicin and cyclophosphamide (TAC)
* Docetaxel in combination with cyclophosphamide (TC)
* Carboplatin or cisplatin in combination with a taxane (paclitaxel, docetaxel, or nab-paclitaxel)
* PRE-REGISTRATION: Residual lesion/enhancement seen in the breast on breast imaging performed after completion of NAC.
* PRE-REGISTRATION: Able to swallow oral medication.
* PRE-REGISTRATION: Willing to undergo biopsy for research.
* PRE-REGISTRATION: Willing to provide tissue and blood samples for correlative research purposes.
* PRE-REGISTRATION: Willing to stop use of strong and moderate inducers and/or strong inhibitors of cytochrome P450 3A =\< 7 days prior to registration.
* PRE-REGISTRATION: Provide written informed consent.
* REGISTRATION: Registration must occur =\< 56 days after last dose of NAC.
* REGISTRATION: Eastern Cooperative Oncology Group (ECOG) performance status (PS) 0, 1, or 2.
* REGISTRATION: COHORT B GROUP 4 ONLY: The following laboratory values obtained after completion of NAC but =\< 14 days prior to registration:
* REGISTRATION: COHORT B GROUP 4 ONLY: Absolute neutrophil count (ANC) \>= 1500/mm\^3.
* REGISTRATION: COHORT B GROUP 4 ONLY: Platelets (PLT) \>= 100,000/mm\^3.
* REGISTRATION: COHORT B GROUP 4 ONLY: Hemoglobin (HgB) \>= 8.0 g/dL.
* REGISTRATION: COHORT B GROUP 4 ONLY: Total bilirubin =\< 1.5 x upper limit of normal (ULN).
* REGISTRATION: COHORT B GROUP 4 ONLY: Aspartate transaminase (AST) serum glutamic oxaloacetic transaminase (SGOT) =\< 3 x ULN.
* REGISTRATION: COHORT B GROUP 4 ONLY: Alanine transaminase (ALT) serum glutamate pyruvate transaminase (SGPT) =\< 3 x ULN.
* REGISTRATION: COHORT B GROUP 4 ONLY: Serum creatinine =\< 1.5 x ULN.
* REGISTRATION: GROUP 2 ONLY: Negative pregnancy test done =\< 7 days prior to registration, for persons of childbearing potential only.
Exclusion Criteria:
* PRE-REGISTRATION: History of deep venous thrombosis (DVT) or pulmonary embolisms (PE) =\< 12 months prior to preregistration; OR Active DVT and/or PE requiring anti-coagulant therapy.
* NOTE: Patients who are on anti-coagulant therapy for maintenance are eligible as long as the DVT and/or PE was \> 12 months prior to enrollment and there is no evidence for active thrombosis (either DVT or PE).
* NOTE: Patients on anticoagulation are eligible; however peri-biopsy and peri-surgical management of anticoagulation is per the institutional standard of care.
* PRE-REGISTRATION: Prior treatment with CDK 4/6 inhibitors (e.g. palbociclib, ribociclib, abemaciclib, etc.)
* PRE-REGISTRATION: Prior treatment with radiation for this breast cancer.
* PRE-REGISTRATION: Prior incisional or excisional breast biopsy for this cancer.
* PRE-REGISTRATION: Any contraindications to pre-registration biopsy (such as bleeding diatheses, etc.).
* PRE-REGISTRATION: Receiving any investigational agent which would be considered as a treatment for the primary neoplasm.
* PRE-REGISTRATION: Other active malignancy =\< 3 years prior to registration.
* EXCEPTIONS: Non-melanotic skin cancer or carcinoma-in-situ of the cervix.
* NOTE: If there is a history of prior malignancy, they must not be receiving another specific treatment for prior malignancy.
* PRE-REGISTRATION: Biopsy proven Stage IV breast cancer.
* PRE-REGISTRATION: Serious pre-existing medical conditions that would preclude participation in this study (for example, interstitial lung disease, severe dyspnea at rest or requiring oxygen therapy, severe renal impairment \[e.g., estimated creatinine clearance \< 30 ml/min\], history of major surgical resection involving the stomach or small bowel, or preexisting Crohn's disease or ulcerative colitis or a preexisting chronic condition resulting in baseline grade 2 or higher diarrhea).
* PRE-REGISTRATION: History of any of the following conditions:
* Syncope of cardiovascular etiology.
* Ventricular arrhythmia of pathological origin (including, but not limited to, ventricular tachycardia and ventricular fibrillation).
* Sudden cardiac arrest.
* NOTE: Patients on anticoagulation are eligible; however peri-biopsy and peri-surgical management of anticoagulation is per the institutional standard of care.
* REGISTRATION: COHORT B GROUP 4: Any of the following because this study involves an investigational agent whose genotoxic, mutagenic and teratogenic effects on the developing fetus and newborn are unknown:
* Pregnant persons.
* Nursing persons.
* Persons of childbearing potential who are unwilling to employ adequate contraception.
* REGISTRATION: COHORT B GROUP 4: Failure to recover to grade 1 or lower from effects of neoadjuvant chemotherapy.
* Exceptions: Residual alopecia and grade 2 peripheral neuropathy are allowed.
* REGISTRATION: COHORT B GROUP 4: Concurrent use of strong and moderate inducers and/or strong inhibitors of cytochrome P450 3A =\< 7 days prior to registration.
* REGISTRATION: COHORT B GROUP 4: Known infections as follows (NOTE: Screening is not required for enrollment):
* Active systemic bacterial infection requiring intravenous antibiotics.
* Active fungal infection (requiring intravenous or oral antifungal treatment).
* Detectable viral infections (e.g. known human immunodeficiency virus \[HIV\], known active hepatitis B or C).
* REGISTRATION: COHORT B GROUP 4: Concurrent use of chemotherapy, radiotherapy, immunotherapy, or other components of neoadjuvant treatment.
* NOTE: Patients must complete all elements of NAC ≥21 days prior to starting abemaciclib.