Even though this thread (https://community.tableau.com/thread/114562) clearly explained the Attribute function, let me try again to clear your doubts for this scenario.
In the link shared by you, Andy created a Field Recession to differentiate the colors. When you convert a dimension to Attribute and use that in view, you're telling tableau to treat it as label. If you directly drag it into Marks card(Anywhere on Color, Size, Detail, Label) without converting to Attribute it will affect the level of detail of viz if there are more than 1 dimension members present.
If I drag directly it into Label or color it will affect the level of viz and tableau will create two different line charts. One for TRUE and another for FALSE values. Orange for True values and Blue for False.
Let's create another field 'Attribute Example' with below code:
IF MONTH([Date]) >=1 AND MONTH([Date]) <= 4 THEN
ELSEIF MONTH([Date])>=5 AND MONTH([Date])<=8 THEN
If I drag this into Color, tableau will create 3 different line charts for all 3 conditions.
When I convert it to Attribute, tableau treat this field as Label to differentiate the colors basis of month instead of affecting the viz level of detail.
Attribute is also used to aggregate the dimension members. For example, In blending two different data sources, it is used to group the dimensions from secondary data sources. You may have also seen an error sometimes while creating calculated field 'Cannot mix aggregate and non-aggregate arguments with this function'. Tableau gives you this error when you try to use Aggregated measures along with disaggregated dimension in a calculated field. In that case ATTR function is used to aggregate the dimension so that aggregation level matches of dimensions and measures.
Hope this helps and clear your doubt.