We know it is not.
However, over two thousand years ago, even when they already knew the Earth to be "round", some Greek philosophers and geometers imagined the possibility that the Earth was a cylinder: two ends that are flat and round, and the "round side" being geometrically "flat" (translation in geometry = angles in a triangle add up to 180 degrees).
Some thought we lived on one of the flat ends, with the other end facing the "central fire" which everything orbits, including the Sun (perfect mirror) and the Moon (imperfect mirror). This was the only position that explained the shape of eclipses.
However, another group (of the "cylinder-Earthers") thought that we lived on the round side, which was the only way to explain how the declination of the zenith changed when travellers moved north-south.
The two concepts (flat end versus round side) were mutually exclusive (they could not be both right); unfortunately, they were also complementary (both conditions must be met).
Even back then, the majority thought the Earth was a sphere.
The main difference between a flat surface (plane trigonometry) and a positively curved surface (spherical trigonometry) is in the sum of angles in a triangle.
On a plane, this sum will always be 180 degrees, regardless of the size of the triangle. On a sphere, the sum will be more than 180, with the spherical excess increasing as the size of the triangle increases. Back then, instruments were not precise enough to measure the difference.
Nowadays, we can. And there are other ways to show that plane trigonometry fails as triangles get bigger on Earth.
To answer your question: How COULD it be flat? by being a cylinder.