Its one of the Pokeweeds, most likely Phytolacca americana, native to parts of the United States. Seeds itself freely, but is actually toxic, though its fine so long as you don't eat it, but probably not a good plant to keep if you have children. https://en.m.wikipedia.org/wiki/Phytolacca_americana
This is not necessarily a weed. It does have several uses. It is what we call poke around my area of Kentucky. Also known as phytolacca americana, it sprouts up all across North America. The other answer mentions it being poisonous, though true, it was still a common dish in my childhood home. Poke sallet is a dish made from the plant’s slightly-less-toxic leaves. The leaves were boiled in water three times to cook out their toxins. It's a regional thing, popular mostly in Appalachia and the American South. It was also made into a tonic and used as a vermifuge, a worm purger. The berries of this plant can be used to make a natural rich deep magenta dye.