Drag the charges and drag the surface. At every point around the loop the sim measures how much field is leaving or entering, adds it all up, and compares the answer with the charge enclosed divided by ε₀. The two agree however you move things, which is what Gauss's law says. Move a charge outside and the field on the surface is as strong as ever, but the total comes to zero.
What to try. Drag the single charge around inside the loop. The pattern of arrows on the boundary changes completely, yet the total never moves: the flux depends on the charge enclosed and on nothing else. Now drag it out through the boundary and watch the total drop to zero the instant it crosses. Switch the surface to the irregular blob and the total is unchanged again, which is why you may choose any surface you like when you use the law to find a field. Finally put a positive and a negative charge inside together: every field line that goes in comes back out, and the sum is zero.
What the graph shows. The second panel is E·n̂ at each point as you walk once around the loop. Green above the line is field leaving, magenta below is field entering, and the flux is the area between the curve and the line. With the charge outside, the two areas are exactly equal and cancel.
Model: a two-dimensional world, so each dot is an infinitely long line of charge seen end-on and the field falls off as 1/r rather than 1/r². The loop is the cross-section of a cylinder and the flux is per meter of its length. Charge is in nanocoulombs per meter, so E = λ/(2πε₀r) and Gauss's law reads Φ = λenclosed/ε₀. The integral is a sum over 720 straight pieces of the boundary, which is accurate to better than a hundredth of a percent unless a charge is sitting almost on the surface.