I think the main reason for this is to allow the attribute to use the methods and properties defined in a particular class. Imagine that Bar had some basic method that could be built by other convenience methods on top ... because the trait requires it to be used in subclasses of Bar , you could define methods in the attribute that calls this method. You can then provide these methods for many subclasses by giving them a trait.
source share