Went to bathroom, blood came out of anus?

Painless? a lot? May be from hemorrhoids. Internal hemorrhoids can bleed, are painless. Could be other causes: inflammation, tumor, fragile blood vessels, diverticulosis (pockets in bowel wall) bright red blood? On toilet paper? In bowl? On stool? In stool? Dark red? Painful? One time? Recurrent? Other bowel symptoms like diarrhea? See your doc to make sure.
See your doctor. Although benign causes are more common than cancer - rectal bleeding could be a sign of colorectal cancer. Don't wait - get it checked out. Cure rates are much higher with early detection!