Inclusion Criteria:
* Age \>= 18 years
* Note: Because no dosing or adverse event data are currently available on the use of talimogene laherparepvec (T-VEC) in patients \< 18 years of age, children are excluded from this study, but will be eligible for future pediatric trials
* Newly diagnosed and a histopathologically confirmed potentially resectable soft tissue sarcoma of the extremity or trunk of the following subtypes:
* Cohort 1: liposarcoma (excluding myxoid liposarcoma)
* Cohort 2: leiomyosarcoma
* Cohort 3: undifferentiated pleomorphic sarcoma (UPS) (malignant fibrous histiosarcoma \[MFH\])
* NOTE: If local pathology report is suggestive of or suspicious for UPS, study chair and study pathologists may review for eligibility determination.
* NOTE: Sites permissible for biopsy include
* Extremities: upper (including shoulder) and lower (including hip)
* Trunk: Body wall
* Patients must have a histologically determined grade 2 or 3 tumor by the French Federation of Cancer Centers Sarcoma Group (FNCLCC) sarcoma grading system
* Patients must have localized disease with a primary tumor \> 5 cm by MRI or computed tomography (CT) scan
* Patients must have a primary tumor that is determined by multidisciplinary team (medical oncology, orthopedic/surgical oncology, and radiation oncology) to require radiation therapy for optimal management prior to surgical resection
* Patients must have a sarcoma in the extremity or trunk in location, which is accessible to direct or ultrasound guided injections
* Karnofsky performance score \>= 70
* Absolute neutrophil count (ANC) \>= 1500/uL
* Absolute lymphocyte count (ALC) \>= 800/uL
* Platelets \>= 100,000/uL
* Hemoglobin \>= 9 g/dL
* Total bilirubin =\< 1.5 x institutional upper limit of normal (ULN)
* Aspartate aminotransferase (AST) and alanine aminotransferase (ALT) =\< 2.5 x institutional ULN
* Calculated creatinine clearance \> 70 mL/min/1.73 m\^2
* Patient must have a life expectancy of at least 3 months with appropriate therapy
* Patients must agree to use contraception during study treatment and for 4 months after the end of treatment
* NOTE: Talimogene laherparepvec (T-VEC), as well as other therapeutic agents used in this trial, may cause fetal harm when administered to a pregnant woman; women of child-bearing potential and men must agree to use adequate contraception (hormonal or barrier method of birth control; abstinence) prior to study entry, during the study participation, and for four months after the last dose of the drug; women of child-bearing potential must have a negative serum pregnancy test within 7 days prior to registration and agree to use effective contraception throughout the treatment period and for 4 months after the last dose of study treatment; should a woman become pregnant or suspect she is pregnant while she or her partner is participating in this study, she should inform her treating physician immediately
* Ability to understand and the willingness to sign a written informed consent document
* Willingness to provide mandatory blood and tissue samples for correlative studies and central pathology confirmation of surgical specimens collected during study participation
* Willingness to provide a tissue sample that is mandatory at the time of surgery (if applicable) and the determination of the primary objective of the study
Exclusion Criteria:
* Patients with localized sarcomas that are not of the extremity or trunk wall (including head/neck, retroperitoneum, visceral organs, peritoneum, pelvis within the confines of the bony pelvis, and tumors arising in bone)
* Patients who have had prior treatment with anti-PD1 or anti-CTLA4 therapy
* Patients with grade 1 non-rhabdomyosarcoma soft tissue sarcomas (NRSTS) tumors of any size are not eligible
* Patients with evidence of active bleeding or bleeding diathesis will be excluded (patients with excess of 2.5 mL of hemoptysis are not eligible)
* Patients requiring any therapeutic anticoagulation
* Patients must have had no prior radiotherapy to tumor-involved sites
* Patients with gross total resection of the primary tumor or who have developed tumor recurrence after gross total tumor resection prior to enrollment are not eligible
* History of serious or non-healing wound, ulcer, or bone fracture
* Patients who have not recovered from adverse events due to prior anti-cancer therapy (i.e., have residual toxicities \> grade 1)
* Use of other investigational drugs within 28 days (or five half-lives, whichever is shorter; with a minimum of 14 days from the last dose) preceding the first dose of talimogene laherparepvec (T-VEC) and during the study
* Previous treatment with talimogene laherparepvec (T-VEC) or any other oncolytic virus
* Patients with metastatic disease
* Have a known immediate or delayed hypersensitivity reaction or idiosyncrasy to talimogene laherparepvec (T-VEC) or any of its components
* History or evidence of active autoimmune disease (e.g., pneumonitis, glomerulonephritis, vasculitis, or other); or history of active autoimmune disease that has required systemic treatment (i.e., use of corticosteroids, immunosuppressive drugs or biological agents used for treatment of autoimmune diseases) within 2 months of enrollment; (replacement therapy \[e.g., thyroxine for hypothyroidism, insulin for diabetes or physiologic corticosteroid replacement therapy for adrenal or pituitary insufficiency\] is not considered a form of systemic treatment for autoimmune disease)
* Evidence of clinically significant immunosuppression such as
* Primary immunodeficiency state such as severe combined immunodeficiency disease
* Concurrent opportunistic infection
* Receiving systemic immunosuppressive therapy (\> 2 weeks) including oral steroid doses \> 10 mg/day of prednisone or equivalent within 2 months prior to enrollment
* Active herpetic skin lesions or prior complications of herpetic infection (e.g., herpetic keratitis or encephalitis)
* Viral infections requiring intermittent or chronic systemic (intravenous or oral) treatment with an anti-herpetic drug, other than intermittent topical use (e.g., acyclovir)
* Other viral infections
* Known to have acute or chronic active hepatitis B or hepatitis C infection
* Known to have human immunodeficiency virus (HIV) infection
* Prior therapy with viral-based tumor vaccine
* Received live vaccine within 28 days prior to enrollment
* Patients who are unwilling to minimize exposure with his/her blood or other body fluids to individuals who are at higher risks for herpes simplex virus (HSV)-1 induced complications such as immunosuppressed individuals, individuals known to have HIV infection, pregnant women, or children under the age of 1 year, during talimogene laherparepvec (T-VEC) treatment and through 30 days after the last dose of talimogene laherparepvec (T-VEC)
* Uncontrolled intercurrent illness including, but not limited to, ongoing or active infection, symptomatic congestive heart failure, unstable angina pectoris, cardiac arrhythmia, or psychiatric illness/social situations that would limit compliance with study requirements
* Patients who are pregnant, breastfeeding or plan to become pregnant
* NOTE: Although no effects on embryo-fetal development have been observed in animal studies, adequate and well-controlled studies with talimogene laherparepvec (T-VEC) have not been conducted in pregnant women; therefore, sexually active patients and their partners must be willing to use adequate contraception (hormonal or barrier method of birth control; abstinence) prior to study entry, during the study participation, and for four months after the last dose of T-VEC