To your question “why are angles in degrees or angles in general said to be dimensionless?” the short answer is that regardless of the unit used to measure angles, the measurements include ratios of quantities of the same kind, length ratios (for example $\,\mathrm{m}/\mathrm{m})$), and are therefore quantities without units, quantities of dimension one, i.e., they are dimensionless.
To your question, “What is meant in mathematics when something is said to have no dimensions?” the short answer is that, in this case, it refers to a physical quantity that is a number and has no unit of measurement.
However, we consider it appropriate to provide detailed answers.
There are several units for measuring angles: degrees, gradians, and radians. The procedure is similar for all units of measurement: We place the vertex of the angle at the center of a circle, measure the length of the arc intercepted by the rays of the angle, denoted by $\,s$, an compare it with the length of the arc taken as a unit, denoted by $\,s_u$.
We can answer these questions in two different ways.
First answer:
If we accept that degrees, gradians, and radians are dimensionless units, then the measure of the plane angle $\,\theta\,$ is equal to the ratio between $\,s\,$ and $\,s_u\,$
$$\theta = \frac {s} {s_u}$$
To show that the formula works correctly:
1.- When angles are measured in degrees, the circumference $\,C\,$ is divided into $\,360\,$ parts of equal length, therefore $\,s_u=C/360$. An angle of $\,1\,$ degree, $\,1°$, is one whose rays pass through the ends of one of those parts. Given that for a complete turn $\,s=C$, in this case the angle measures
$$\theta=\frac {C} {C/360}\qquad \implies \qquad \theta=360° $$
2.- When angles are measured in gradians, the circumference $\,C\,$ is divided into $\,400\,$ parts of equal length, therefore $\,s_u=C/400$. An angle of $\,1\,$ gradian, $\,1^g$, is one whose rays pass through the ends of one of those parts. Given that for a complete turn $\,s=C$, in this case the angle measures
$$\theta=\frac {C} {C/400}\qquad \implies \qquad \theta=400^g $$
3.- When angles are measured in radians, we know from the
SI Brochure that “One radian is the angle subtended at the center of a circle by an arc that is equal in length to the radius” (p.138), therefore $\,s_u=r$, where $\,r\,$ denotes the length of the radius. Since for a complete turn $\,s=C=2 \pi r$, in this case the angle measures
$$\theta=\frac {2 \pi r} {r}\qquad \implies \qquad \theta=2 \pi\, \mathrm{rad} $$
The unit for measuring angles in the International System of Units (SI) is the radian, which is considered a dimensionless derived unit and $\,1\,\mathrm{rad}=1\,$.
Second answer:
If degrees, gradians, and radians are not dimensionless units, then in
$$\theta = \frac {s} {s_u}$$
the variable $\,\theta\,$ must be dimensionless, $\,\dim \theta=1\,$ since $\,s/s_u\,$ is dimensionless because the units of length cancel out (e.g., $\,\mathrm{m}/\mathrm{m}$). The difference is that $\,\theta\,$ has no units, but is simply a number. In these cases, let us denote $\,\beta\,$ as the value of the angle.
To show that the formula works correctly:
1.- When angles are measured in degrees, $\,s_u=C/360$. For a complete turn, $\,s=C$, in which case $\,\theta\,$ is the “number of degrees” and the angle $\,\beta\,$ measures
$$\theta=\frac {C} {C/360}=360\qquad \implies \qquad \beta=360° $$
2.- When angles are measured in gradians $\,s_u=C/400$. As for a complete turn, $\,s=C$, in this case $\,\theta\,$ is the “number of gradians” and the angle $\,\beta\,$ measures
$$\theta=\frac {C} {C/400}=400 \qquad \implies \qquad \beta=400^g $$
3.- When angles are measured in radians, $\,s_u=r$, where $\,r\,$ denotes the length of the radius. For a complete turn, $\,s=C=2 \pi r$, in which case $\,\theta\,$ is the “number of radians” and the angle $\,\beta\,$ measures
$$\theta=\frac {2 \pi r} {r}=2 \pi \qquad \implies \qquad \beta=2 \pi \,\mathrm{rad} $$
The difference between $\,\theta$, which represents numbers, and $\,\beta$, which represents angle measures that have a numerical value and a unit of measurement, is clear.
For many years, the status of the radian in the SI Brochure has been the subject of debate in the Consultative Committee for Units (CCU) of the BIPM. There is still no consensus. The majority believes that the radian is a dimensionless derived unit (and therefore remains so in the SI Brochure), while a group considers that the radian should be a base unit, as it is not a dimensionless derived unit.
We believe that the correct answer is the second one.