That's surprising enough, but it turns out this particular form of magnetism has previously only been theorized.
Since it's only one atom thick, graphene is effectively two-dimensional. That forces electrons traveling through it to only move along two axes, which in turn creates a host of unusual properties that have given graphene the moniker of a "wonder material."
From that starting point, graphene sheets can be stacked and manipulated in other ways to give it different abilities. In a study last year, an MIT team found that graphene could become a superconductor, meaning electricity passes through it freely with zero resistance. This was done by stacking two sheets and twisting them so their patterns don't quite line up, forming what's called twisted bilayer graphene.
The Stanford team set out to reproduce these results and build on them. In doing so, they accidentally made the graphene exhibit magnetism. They discovered this while sending an electrical current into a graphene sample, when a large voltage was detected perpendicular to the flow of the current. This normally needs a magnetic field to happen, but strangely the voltage stuck around when the external magnetic field was turned off. That means the graphene itself was generating an internal magnetic field.